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.0KB

  1. #ifndef ENGINE_MGR_H
  2. #define ENGINE_MGR_H
  3. #include <list>
  4. #include <string>
  5. #include "Engine.h"
  6. class MidiIn;
  7. class AudioOut;
  8. class OutMgr;
  9. struct SYNTH_T;
  10. /**Container/Owner of the long lived Engines*/
  11. class EngineMgr
  12. {
  13. public:
  14. static EngineMgr &getInstance(
  15. const SYNTH_T *synth = nullptr,
  16. const class oss_devs_t* oss_devs = nullptr);
  17. ~EngineMgr();
  18. /**Gets requested engine
  19. * @param name case unsensitive name of engine
  20. * @return pointer to Engine or NULL
  21. */
  22. Engine *getEng(std::string name);
  23. /**Start up defaults*/
  24. bool start();
  25. /**Stop all engines*/
  26. void stop();
  27. std::list<Engine *> engines;
  28. //return false on failure
  29. bool setInDefault(std::string name);
  30. bool setOutDefault(std::string name);
  31. //default I/O
  32. AudioOut *defaultOut;
  33. MidiIn *defaultIn;
  34. private:
  35. EngineMgr(const SYNTH_T *synth, const oss_devs_t &oss_devs);
  36. };
  37. #endif