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.

47 lines
1.1KB

  1. /*
  2. ZynAddSubFX - a software synthesizer
  3. Recorder.h - Records sound to a file
  4. Copyright (C) 2002-2005 Nasca Octavian Paul
  5. Author: Nasca Octavian Paul
  6. This program is free software; you can redistribute it and/or
  7. modify it under the terms of the GNU General Public License
  8. as published by the Free Software Foundation; either version 2
  9. of the License, or (at your option) any later version.
  10. */
  11. #ifndef RECORDER_H
  12. #define RECORDER_H
  13. #include <string>
  14. struct SYNTH_T;
  15. /**Records sound to a file*/
  16. class Recorder
  17. {
  18. public:
  19. Recorder(const SYNTH_T &synth);
  20. ~Recorder();
  21. /**Prepare the given file.
  22. * @returns 1 if the file exists */
  23. int preparefile(std::string filename_, int overwrite);
  24. void start();
  25. void stop();
  26. void pause();
  27. int recording();
  28. void triggernow();
  29. /** Status:
  30. * 0 - not ready(no file selected),
  31. * 1 - ready
  32. * 2 - recording */
  33. int status;
  34. private:
  35. int notetrigger;
  36. const SYNTH_T &synth;
  37. };
  38. #endif