xref: /titanic_51/usr/src/cmd/cdrw/audio.h (revision 7c478bd95313f5f23a4c958a745db2134aa03244)
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) 2001 by Sun Microsystems, Inc.
24  * All rights reserved.
25  */
26 
27 #ifndef	_AUDIO_H
28 #define	_AUDIO_H
29 
30 #pragma ident	"%Z%%M%	%I%	%E% SMI"
31 
32 /*
33  * Contains the audio files information for cdrw.
34  */
35 
36 #ifdef	__cplusplus
37 extern "C" {
38 #endif
39 
40 #include <sys/types.h>
41 
42 typedef struct {
43 	char riff[4];
44 	uint32_t total_chunk_size;
45 	char wave[4];
46 	char fmt[4];
47 	uint32_t fmt_size;
48 	uint16_t fmt_tag;
49 	uint16_t n_channels;
50 	uint32_t sample_rate;
51 	uint32_t bytes_per_second;
52 	uint16_t align;
53 	uint16_t bits_per_sample;
54 	char data[4];
55 	uint32_t data_size;
56 } Wave_filehdr;
57 
58 
59 #define	PRE_DEF_WAV_HDR		{   'R', 'I', 'F', 'F', 0, 0, 0, 0, \
60 				    'W', 'A', 'V', 'E', 'f', 'm', 't', ' ', \
61 				    0x10, 0, 0, 0, 1, 0, 2, 0, \
62 				    0x44, 0xac, 0, 0, 0x10, 0xb1, 2, 0, \
63 				    4, 0, 0x10, 0, 'd', 'a', 't', 'a', \
64 				    0, 0, 0, 0 }
65 #define	PRE_DEF_WAV_HDR_LEN	44
66 
67 #define	PRE_DEF_AU_HDR		{   '.', 's', 'n', 'd', 0, 0, 0, 0x28, \
68 				    0, 0, 0, 0, 0, 0, 0, 3, \
69 				    0, 0, 0xac, 0x44, 0, 0, 0, 2, \
70 				    0x43, 0x44, 0x20, 0x41, 0x75, 0x64, 0x69, \
71 				    0x6f, 0, 0, 0, 0, 0, 0, 0, 0 }
72 #define	PRE_DEF_AU_HDR_LEN	40
73 
74 #ifdef	__cplusplus
75 }
76 #endif
77 
78 #endif /* _AUDIO_H */
79