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.

48 lines
1.0KB

  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. class NulEngine:public AudioOut, MidiIn
  19. {
  20. public:
  21. NulEngine(const SYNTH_T &synth_);
  22. ~NulEngine();
  23. bool Start();
  24. void Stop();
  25. void setAudioEn(bool nval);
  26. bool getAudioEn() const;
  27. void setMidiEn(bool) {}
  28. bool getMidiEn() const {return true; }
  29. protected:
  30. void *AudioThread();
  31. static void *_AudioThread(void *arg);
  32. private:
  33. struct timeval playing_until;
  34. pthread_t *pThread;
  35. };
  36. #endif