b3WriteWavFile.h 637 B

1234567891011121314151617181920212223242526272829
  1. #ifndef B3_WRITE_WAV_FILE_H
  2. #define B3_WRITE_WAV_FILE_H
  3. // b3WriteWavFile is copied from Stk::FileWvOut/FileWrite
  4. // See also https://github.com/thestk/stk
  5. // by Perry R. Cook and Gary P. Scavone, 1995--2014.
  6. #include <string>
  7. class b3WriteWavFile
  8. {
  9. void incrementFrame(void);
  10. void flush();
  11. struct b3WriteWavFileInternalData* m_data;
  12. void flushData(int bufferSize);
  13. public:
  14. b3WriteWavFile();
  15. virtual ~b3WriteWavFile();
  16. bool setWavFile(std::string fileName, int sampleRate, int numChannels, bool useDoublePrecision = true);
  17. void closeWavFile();
  18. void tick(double* values, int numValues);
  19. };
  20. #endif //B3_WRITE_WAV_FILE_H