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.

51 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. namespace zyncarla {
  15. struct SYNTH_T;
  16. /**Records sound to a file*/
  17. class Recorder
  18. {
  19. public:
  20. Recorder(const SYNTH_T &synth);
  21. ~Recorder();
  22. /**Prepare the given file.
  23. * @returns 1 if the file exists */
  24. int preparefile(std::string filename_, int overwrite);
  25. void start();
  26. void stop();
  27. void pause();
  28. int recording();
  29. void triggernow();
  30. /** Status:
  31. * 0 - not ready(no file selected),
  32. * 1 - ready
  33. * 2 - recording */
  34. int status;
  35. private:
  36. int notetrigger;
  37. const SYNTH_T &synth;
  38. };
  39. }
  40. #endif