#ifndef	V_WAVLIB_H
#define V_WAVLIB_H

#ifdef	__cplusplus
extern "C" {
#endif	/* __cplusplus */
	/*	Opens WAV file for input. Returns wave handle of NULL on error. */
	vhandle_t V_GLOBAL	wavOpenRead(char *name);
	/*	Starts writing of wav file. Returned handle must be later */
	vhandle_t V_GLOBAL	wavOpenWrite(char *name,
		u32_t num_channels,u32_t sampling_frequency,u32_t bits_per_sample);
	/*	Loads entire file, stores data memAlloc()'ed buffer.
	 *	Optionally stores audio parameters to *XXX_ret's.
	 */
	void_p	V_GLOBAL	wavLoadFile(char *name, u32_t *nsamples_ret,
		u32_t *nchannels_ret,u32_t *freq_ret,u32_t *bps_ret);
	/*	Helper functions. ============================================= */
	u32_t	V_GLOBAL	wavNumChannels(vhandle_t handle);
	u32_t	V_GLOBAL	wavSamplingFrequency(vhandle_t handle);
	u32_t	V_GLOBAL	wavBitsPerSample(vhandle_t handle);
	u32_t	V_GLOBAL	wavNumSamples(vhandle_t handle);
#ifdef	CONFIG_AUDIO_MP3
	/*
	 *	Opens MPEG-3 audio file for input.
	 *	To get decompressed data, call fileRead().
	 */
	file_t V_GLOBAL	mp3Open(char *name);
#endif	/* CONFIG_AUDIO_MP3 */

#ifdef	__cplusplus
}
#endif	/* __cplusplus */

#endif	/* V_WAVLIB_H */
