Collection of tools useful for audio production
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.

80 lines
2.1KB

  1. /*
  2. * Carla Backend
  3. * Copyright (C) 2011-2012 Filipe Coelho <falktx@gmail.com>
  4. *
  5. * This program is free software; you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License as published by
  7. * the Free Software Foundation; either version 2 of the License, or
  8. * any later version.
  9. *
  10. * This program is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. * GNU General Public License for more details.
  14. *
  15. * For a full copy of the GNU General Public License see the COPYING file
  16. */
  17. #ifndef CARLA_THREADS_H
  18. #define CARLA_THREADS_H
  19. #include "carla_backend.h"
  20. #include <QtCore/QThread>
  21. class QProcess;
  22. // --------------------------------------------------------------------------------------------------------
  23. // CarlaCheckThread
  24. class CarlaCheckThread : public QThread
  25. {
  26. public:
  27. CarlaCheckThread(CarlaBackend::CarlaEngine* const engine, QObject* const parent = nullptr);
  28. ~CarlaCheckThread();
  29. void stopNow();
  30. protected:
  31. void run();
  32. private:
  33. CarlaBackend::CarlaEngine* const engine;
  34. bool m_stopNow;
  35. };
  36. // --------------------------------------------------------------------------------------------------------
  37. // CarlaPluginThread
  38. class CarlaPluginThread : public QThread
  39. {
  40. public:
  41. enum PluginThreadMode {
  42. PLUGIN_THREAD_DSSI_GUI,
  43. PLUGIN_THREAD_LV2_GUI,
  44. PLUGIN_THREAD_VST_GUI,
  45. PLUGIN_THREAD_BRIDGE
  46. };
  47. CarlaPluginThread(CarlaBackend::CarlaEngine* const engine, CarlaBackend::CarlaPlugin* const plugin, const PluginThreadMode mode, QObject* const parent = nullptr);
  48. ~CarlaPluginThread();
  49. void setOscData(const char* const binary, const char* const label, const char* const data1="");
  50. protected:
  51. void run();
  52. private:
  53. CarlaBackend::CarlaEngine* const engine;
  54. CarlaBackend::CarlaPlugin* const plugin;
  55. const PluginThreadMode mode;
  56. QString m_binary;
  57. QString m_label;
  58. QString m_data1;
  59. QProcess* m_process;
  60. };
  61. #endif // CARLA_THREADS_H