1 /* Sonic library 2 Copyright 2010 3 Bill Cox 4 This file is part of the Sonic Library. 5 6 This file is licensed under the Apache 2.0 license. */ 7 8 /* Support for reading and writing wave files. */ 9 10 typedef struct waveFileStruct *waveFile; 11 12 waveFile openInputWaveFile(char *fileName, int *sampleRate, int *numChannels); 13 waveFile openOutputWaveFile(char *fileName, int sampleRate, int numChannels); 14 int closeWaveFile(waveFile file); 15 int readFromWaveFile(waveFile file, short *buffer, int maxSamples); 16 int writeToWaveFile(waveFile file, short *buffer, int numSamples); 17