xref: /illumos-gate/usr/src/cmd/audio/include/Audio_inline.h (revision 20a7641f9918de8574b8b3b47dbe35c4bfc78df1)
1 /*
2  * CDDL HEADER START
3  *
4  * The contents of this file are subject to the terms of the
5  * Common Development and Distribution License, Version 1.0 only
6  * (the "License").  You may not use this file except in compliance
7  * with the License.
8  *
9  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10  * or http://www.opensolaris.org/os/licensing.
11  * See the License for the specific language governing permissions
12  * and limitations under the License.
13  *
14  * When distributing Covered Code, include this CDDL HEADER in each
15  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16  * If applicable, add the following below this CDDL HEADER, with the
17  * fields enclosed by brackets "[]" replaced with your own identifying
18  * information: Portions Copyright [yyyy] [name of copyright owner]
19  *
20  * CDDL HEADER END
21  */
22 /*
23  * Copyright (c) 1990-2001 by Sun Microsystems, Inc.
24  * All rights reserved.
25  */
26 
27 #ifndef _MULTIMEDIA_AUDIO_INLINE_H
28 #define	_MULTIMEDIA_AUDIO_INLINE_H
29 
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
33 
34 // Inline routines for class Audio
35 
36 // Return object id
37 inline int Audio::
38 getid() const
39 {
40 	return (id);
41 }
42 
43 // Return TRUE if the object is referenced
44 inline Boolean Audio::
45 isReferenced() const
46 {
47 	return (refcnt > 0);
48 }
49 
50 // Access routine for retrieving the current read position pointer
51 inline Double Audio::
52 ReadPosition() const
53 {
54 	return (readpos);
55 }
56 
57 // Access routine for retrieving the current write position pointer
58 inline Double Audio::
59 WritePosition() const
60 {
61 	return (writepos);
62 }
63 
64 // Return the name of an audio object
65 inline char *Audio::
66 GetName() const
67 {
68 	return (name);
69 }
70 
71 // Set the error function callback address
72 inline void Audio::
73 SetErrorFunction(
74 	AudioErrfunc	func)			// function address
75 {
76 	errorfunc = func;
77 }
78 
79 // Default get header at position routine does a normal GetHeader
80 inline AudioHdr Audio::
81 GetDHeader(
82 	Double)
83 {
84 	return (GetHeader());
85 }
86 
87 #ifdef __cplusplus
88 }
89 #endif
90 
91 #endif /* !_MULTIMEDIA_AUDIO_INLINE_H */
92