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