2017-04-27 04:31:01 +00:00
|
|
|
#ifndef B3_WRITE_WAV_FILE_H
|
|
|
|
#define B3_WRITE_WAV_FILE_H
|
|
|
|
|
|
|
|
// b3WriteWavFile is copied from Stk::FileWvOut/FileWrite
|
|
|
|
// See also https://github.com/thestk/stk
|
|
|
|
// by Perry R. Cook and Gary P. Scavone, 1995--2014.
|
|
|
|
#include <string>
|
|
|
|
|
|
|
|
class b3WriteWavFile
|
|
|
|
{
|
2018-09-23 21:17:31 +00:00
|
|
|
void incrementFrame(void);
|
2017-04-27 04:31:01 +00:00
|
|
|
void flush();
|
|
|
|
|
|
|
|
struct b3WriteWavFileInternalData* m_data;
|
|
|
|
|
|
|
|
void flushData(int bufferSize);
|
|
|
|
|
|
|
|
public:
|
|
|
|
b3WriteWavFile();
|
|
|
|
virtual ~b3WriteWavFile();
|
|
|
|
|
2018-09-23 21:17:31 +00:00
|
|
|
bool setWavFile(std::string fileName, int sampleRate, int numChannels, bool useDoublePrecision = true);
|
2017-04-27 04:31:01 +00:00
|
|
|
|
|
|
|
void closeWavFile();
|
|
|
|
|
2018-09-23 21:17:31 +00:00
|
|
|
void tick(double* values, int numValues);
|
2017-04-27 04:31:01 +00:00
|
|
|
};
|
|
|
|
|
2017-04-27 04:34:43 +00:00
|
|
|
#endif //B3_WRITE_WAV_FILE_H
|