Audio plugin host https://kx.studio/carla
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

WavFile.h 899B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. /*
  2. ZynAddSubFX - a software synthesizer
  3. WavFile.h - Records sound to a file
  4. Copyright (C) 2008 Nasca Octavian Paul
  5. Author: Nasca Octavian Paul
  6. Mark McCurry
  7. This program is free software; you can redistribute it and/or
  8. modify it under the terms of the GNU General Public License
  9. as published by the Free Software Foundation; either version 2
  10. of the License, or (at your option) any later version.
  11. */
  12. #ifndef WAVFILE_H
  13. #define WAVFILE_H
  14. #include <string>
  15. namespace zyncarla {
  16. class WavFile
  17. {
  18. public:
  19. WavFile(std::string filename, int samplerate, int channels);
  20. ~WavFile();
  21. bool good() const;
  22. void writeMonoSamples(int nsmps, short int *smps);
  23. void writeStereoSamples(int nsmps, short int *smps);
  24. private:
  25. int sampleswritten;
  26. int samplerate;
  27. int channels;
  28. FILE *file;
  29. };
  30. }
  31. #endif