blob: bd5f2280f92e2ea7d5bca47edcbe17f3054ba646 [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
6This program is free software; you can redistribute it and/or modify
7it under the terms of the GNU General Public License as published by
8the Free Software Foundation; either version 2 of the License, or
9(at your option) any later version.
10
11This program is distributed in the hope that it will be useful,
12but WITHOUT ANY WARRANTY; without even the implied warranty of
13MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14GNU General Public License for more details.
15
16You should have received a copy of the GNU General Public License
17along with this program; if not, write to the Free Software
18Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
19
20/* Support for reading and writing wave files. */
21
22typedef struct waveFileStruct *waveFile;
23
24waveFile openInputWaveFile(char *fileName, int *sampleRate);
25waveFile openOutputWaveFile(char *fileName, int sampleRate);
26void closeWaveFile(waveFile file);
27int readFromWaveFile(waveFile file, float *buffer, int maxSamples);
28int writeToWaveFile(waveFile file, float *buffer, int numSamples);