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.

52 lines
1.1KB

  1. /*
  2. ZynAddSubFX - a software synthesizer
  3. NulEngine.h - Dummy In/Out driver
  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 NUL_ENGINE_H
  12. #define NUL_ENGINE_H
  13. #include <sys/time.h>
  14. #include <pthread.h>
  15. #include "../globals.h"
  16. #include "AudioOut.h"
  17. #include "MidiIn.h"
  18. namespace zyncarla {
  19. class NulEngine:public AudioOut, MidiIn
  20. {
  21. public:
  22. NulEngine(const SYNTH_T &synth_);
  23. ~NulEngine();
  24. bool Start();
  25. void Stop();
  26. void setAudioEn(bool nval);
  27. bool getAudioEn() const;
  28. void setMidiEn(bool) {}
  29. bool getMidiEn() const {return true; }
  30. protected:
  31. void *AudioThread();
  32. static void *_AudioThread(void *arg);
  33. private:
  34. struct timeval playing_until;
  35. pthread_t *pThread;
  36. };
  37. }
  38. #endif