#define FORMAT_PCM   0x0001
#define FORMAT_MULAW 0x0101
#define FORMAT_ALAW  0x0102
#define FORMAT_ADPCM 0x0103

typedef struct _riff_header {
  unsigned char id[4];
  unsigned int  len;
  unsigned char wave_id[4]; } riff_header;

typedef struct _riff_chunk {
  unsigned char id[4];
  unsigned int  len; } riff_chunk;

typedef struct _riff_common {
  unsigned short tag;
  unsigned short channels;
  unsigned int   rate;
  unsigned int   bytespersec;
  unsigned short align;
  unsigned short bits; } riff_common;
