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.

45 lines
1.5KB

  1. #pragma once
  2. #include <functional>
  3. #include <cstdarg>
  4. #include <string>
  5. struct SYNTH_T;
  6. class Master;
  7. //Link between realtime and non-realtime layers
  8. class MiddleWare
  9. {
  10. public:
  11. MiddleWare(SYNTH_T synth, int prefered_port = -1);
  12. ~MiddleWare(void);
  13. void updateResources(Master *m);
  14. //returns internal master pointer
  15. class Master *spawnMaster(void);
  16. //return UI interface
  17. class Fl_Osc_Interface *spawnUiApi(void);
  18. //Set callback to push UI events to
  19. void setUiCallback(void(*cb)(void*,const char *),void *ui);
  20. //Set callback to run while busy
  21. void setIdleCallback(void(*cb)(void*),void *ptr);
  22. //Handle events
  23. void tick(void);
  24. //Do A Readonly Operation (For Parameter Copy)
  25. void doReadOnlyOp(std::function<void()>);
  26. //Handle a rtosc Message uToB
  27. void transmitMsg(const char *);
  28. //Handle a rtosc Message uToB
  29. void transmitMsg(const char *, const char *args, ...);
  30. //Handle a rtosc Message uToB
  31. void transmitMsg(const char *, const char *args, va_list va);
  32. //Indicate that a program will be loaded on a known part
  33. void pendingSetProgram(int part, int program);
  34. //Get/Set the active bToU url
  35. std::string activeUrl(void);
  36. void activeUrl(std::string u);
  37. //View Synthesis Parameters
  38. const SYNTH_T &getSynth(void) const;
  39. //liblo stuff
  40. const char* getServerAddress(void) const;
  41. private:
  42. class MiddleWareImpl *impl;
  43. };