blob: aad45c538ca42d3a48a666d847e92efb7b34e6f7 [file] [log] [blame]
Bill Coxca02d872010-11-02 15:10:52 -04001/* Sonic library
2 Copyright 2010
3 Bill Cox
4 This file is part of the Sonic Library.
5
Bill Cox60eeb062015-02-27 10:17:45 -08006 This file is licensed under the Apache 2.0 license. */
Bill Coxca02d872010-11-02 15:10:52 -04007
8/* Support for reading and writing wave files. */
9
10typedef struct waveFileStruct *waveFile;
11
Bill Cox1a299bb2010-11-19 15:07:17 -050012waveFile openInputWaveFile(char *fileName, int *sampleRate, int *numChannels);
13waveFile openOutputWaveFile(char *fileName, int sampleRate, int numChannels);
Bill Coxec23ae02011-10-21 03:02:47 -040014int closeWaveFile(waveFile file);
Bill Cox0c4c0602010-11-08 11:46:30 -050015int readFromWaveFile(waveFile file, short *buffer, int maxSamples);
16int writeToWaveFile(waveFile file, short *buffer, int numSamples);