/*
 * FAAD - Freeware Advanced Audio Decoder
 * Copyright (C) 2001 Menno Bakker
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 *
 * $Id: wav.h,v 1.2 2001/05/02 05:39:29 menno Exp $
 */

#ifndef _WAV_H
#define _WAV_H

typedef struct {
	unsigned short	format_tag;
	unsigned short	channels;			/* 1 = mono, 2 = stereo */
	unsigned long	samplerate;			/* typically: 44100, 32000, 22050, 11025 or 8000*/
	unsigned long	bytes_per_second;	/* SamplesPerSec * BlockAlign*/
	unsigned short	blockalign;			/* Channels * (BitsPerSample / 8)*/
	unsigned short	bits_per_sample;	/* 16 or 8 */
} WAVEAUDIOFORMAT;

typedef struct {
	char info[4];
	unsigned long length;
} RIFF_CHUNK;

int CreateWavHeader(FILE *file, int channels, int samplerate, int resolution);
int UpdateWavHeader(FILE *file);
BOOL getWavInfo( char *cFileName, int *nFsRate, int *nChannelNum, int *nBpsRate, int *nExcludeLen, unsigned long *ulCkSize );

#endif
