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