1 #ifndef _AU_H 2 #define _AU_H 3 4 struct snd_header { 5 uint32 magic; // magic number '.snd' 6 uint32 data_start; // offset to the data 7 uint32 data_size; // number of bytes of data 8 uint32 data_format; // data format code 9 uint32 sampling_rate; // sampling rate 10 uint32 channel_count; // number of channels 11 char info[4]; // optional text information, NULL termintated, at least 4 bytes 12 }; 13 14 enum { 15 SND_FORMAT_UNSPECIFIED = 0, // unspecified format 16 SND_FORMAT_MULAW_8 = 1, // 8-bit mu-law samples 17 SND_FORMAT_LINEAR_8 = 2, // 8-bit linear samples 18 SND_FORMAT_LINEAR_16 = 3, // 16-bit linear samples 19 SND_FORMAT_LINEAR_24 = 4, // 24-bit linear samples 20 SND_FORMAT_LINEAR_32 = 5, // 32-bit linear samples 21 SND_FORMAT_FLOAT = 6, // 32-bit IEEE floating-point samples 22 SND_FORMAT_DOUBLE = 7, // 64-bit IEEE floating-point samples 23 SND_FORMAT_INDIRECT = 8, // fragmented sampled data 24 SND_FORMAT_NESTED = 9, 25 SND_FORMAT_DSP_CORE = 10, // DSP program 26 SND_FORMAT_DSP_DATA_8 = 11, // 8-bit fixed-point samples 27 SND_FORMAT_DSP_DATA_16 = 12,// 16-bit fixed-point samples 28 SND_FORMAT_DSP_DATA_24 = 13,// 24-bit fixed-point samples 29 SND_FORMAT_DSP_DATA_32 = 14,// 32-bit fixed-point samples 30 SND_FORMAT_15 = 15, 31 SND_FORMAT_DISPLAY = 16, // non-audio display data 32 SND_FORMAT_MULAW_SQUELCH = 17, 33 SND_FORMAT_EMPHASIZED = 18, // 16-bit linear with emphasis 34 SND_FORMAT_COMPRESSED = 19, // 16-bit linear with compression 35 SND_FORMAT_COMPRESSED_EMPHASIZED = 20, // A combination of the two above 36 SND_FORMAT_DSP_COMMANDS = 21,// Music Kit DSP commands 37 SND_FORMAT_DSP_COMMANDS_SAMPLES = 22, 38 SND_FORMAT_ADPCM_G721 = 23, 39 SND_FORMAT_ADPCM_G722 = 24, 40 SND_FORMAT_ADPCM_G723_3 = 25, 41 SND_FORMAT_ADPCM_G723_5 = 26, 42 SND_FORMAT_ALAW_8 = 27, 43 }; 44 45 #define SND_RATE_8012 8012.821 // CODEC input 46 #define SND_RATE_22050 22050.0 // low sampling rate output 47 #define SND_RATE_44100 44100.0 // high sampling rate output 48 49 #define SND_MAGIC 0x2e736e64 // '.snd' 50 51 #endif 52