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.

NulEngine.h 1.4KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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 modify
  7. it under the terms of version 2 of the GNU General Public License
  8. as published by the Free Software Foundation.
  9. This program is distributed in the hope that it will be useful,
  10. but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. GNU General Public License (version 2 or later) for more details.
  13. You should have received a copy of the GNU General Public License (version 2)
  14. along with this program; if not, write to the Free Software Foundation,
  15. Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  16. */
  17. #ifndef NUL_ENGINE_H
  18. #define NUL_ENGINE_H
  19. #include <sys/time.h>
  20. #include <pthread.h>
  21. #include "../globals.h"
  22. #include "AudioOut.h"
  23. #include "MidiIn.h"
  24. class NulEngine:public AudioOut, MidiIn
  25. {
  26. public:
  27. NulEngine(const SYNTH_T &synth_);
  28. ~NulEngine();
  29. bool Start();
  30. void Stop();
  31. void setAudioEn(bool nval);
  32. bool getAudioEn() const;
  33. void setMidiEn(bool) {}
  34. bool getMidiEn() const {return true; }
  35. protected:
  36. void *AudioThread();
  37. static void *_AudioThread(void *arg);
  38. private:
  39. struct timeval playing_until;
  40. pthread_t *pThread;
  41. };
  42. #endif