/* * $Id: encode_riff.h,v 1.1 1997/02/28 14:02:58 tommy Exp $ */ #ifndef _ENCODE_RIFF_H #define _ENCODE_RIFF_H #include #define RIFF_MAGIC 'RIFF' #define RIFF_TYPE 'WAVE' #define RIFF_FORMAT 'fmt' #define RIFF_DATA 'data' typedef struct { u_int32_t magic; /* always 'RIFF' */ u_int32_t length; /* length of file */ u_int32_t chunk_type; /* always 'WAVE' */ u_int32_t chunk_format; /* always 'fmt' */ u_int32_t chunk_length; /* length of data chunk */ u_int16_t format; /* always 1 (PCM) */ u_int16_t channels; /* 1 (monoral) or 2 (stereo) */ u_int32_t sample_rate; /* sampling rate (Hz) */ u_int32_t speed; /* byte / sec */ u_int16_t sample_size; /* bytes / sample */ /* mono: 1 (8bit) or 2 (16 bit) */ /* stereo: 2 (8 bit) or 4 (16 bit) */ u_int16_t precision; /* bits / sample 8, 12 or 16 */ u_int32_t chunk_data; /* always 'data' */ u_int32_t data_length; /* length of data chunk */ } riff_header_t; #endif /* _ENCODE_RIFF_H */