xref: /illumos-gate/usr/src/cmd/audio/include/AudioLib.h (revision 9b9d39d2a32ff806d2431dbcc50968ef1e6d46b2)
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_AUDIOLIB_H
28 #define	_MULTIMEDIA_AUDIOLIB_H
29 
30 #ifdef NO_EXTERN_C
31 
32 #ifdef __cplusplus
33 extern "C" {
34 #endif
35 
36 #endif /* NO_EXTERN_C */
37 
38 #include <Audio.h>
39 
40 // Declarations for global functions
41 // Copy entire stream
42 AudioError AudioCopy(
43     Audio*	from,				// input source
44     Audio*	to);				// output sink
45 
46 // Copy data
47 AudioError AudioCopy(
48     Audio*	from,				// input source
49     Audio*	to,				// output sink
50     Double&	frompos,			// input position (updated)
51     Double&	topos,				// output position (updated)
52     Double&	limit);				// amount to copy (updated)
53 
54 // Copy one data segment
55 AudioError AudioAsyncCopy(
56     Audio*	from,				// input source
57     Audio*	to,				// output sink
58     Double&	frompos,			// input position (updated)
59     Double&	topos,				// output position (updated)
60     Double&	limit);				// amount to copy (updated)
61 
62 // Filename->AudioList
63 AudioError Audio_OpenInputFile(
64     const char *path,				// input filename
65     Audio*&	ap);				// returned AudioList ptr
66 
67 // Copy to output file
68 AudioError Audio_WriteOutputFile(
69     const char *path,				// output filename
70     const AudioHdr&	hdr,			// output data header
71     Audio*	input);				// input data stream
72 
73 #ifdef NO_EXTERN_C
74 
75 #ifdef __cplusplus
76 }
77 #endif
78 
79 #endif /* NO_EXTERN_C */
80 
81 #endif /* !_MULTIMEDIA_AUDIOLIB_H */
82