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.

44 lines
867B

  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. /**Container/Owner of the long lived Engines*/
  10. class EngineMgr
  11. {
  12. public:
  13. static EngineMgr &getInstance();
  14. ~EngineMgr();
  15. /**Gets requested engine
  16. * @param name case unsensitive name of engine
  17. * @return pointer to Engine or NULL
  18. */
  19. Engine *getEng(std::string name);
  20. /**Start up defaults*/
  21. bool start();
  22. /**Stop all engines*/
  23. void stop();
  24. std::list<Engine *> engines;
  25. //return false on failure
  26. bool setInDefault(std::string name);
  27. bool setOutDefault(std::string name);
  28. //default I/O
  29. AudioOut *defaultOut;
  30. MidiIn *defaultIn;
  31. private:
  32. EngineMgr();
  33. };
  34. #endif