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.

100 lines
2.4KB

  1. /*
  2. * Carla VST Plugin
  3. * Copyright (C) 2011-2013 Filipe Coelho <falktx@falktx.com>
  4. *
  5. * This program is free software; you can redistribute it and/or
  6. * modify it under the terms of the GNU General Public License as
  7. * published by the Free Software Foundation; either version 2 of
  8. * the License, or 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 doc/GPL.txt file.
  16. */
  17. #include "CarlaPluginInternal.hpp"
  18. #ifdef HAVE_JUCE
  19. //#include "JuceHeader.h"
  20. //using juce::VSTPluginFormat;
  21. CARLA_BACKEND_START_NAMESPACE
  22. #if 0
  23. class JucePlugin : public CarlaPlugin
  24. {
  25. public:
  26. JucePlugin(CarlaEngine* const engine, const unsigned short id)
  27. : CarlaPlugin(engine, id)
  28. {
  29. carla_debug("JucePlugin::JucePlugin(%p, %i)", engine, id);
  30. }
  31. ~Vst3Plugin() override
  32. {
  33. carla_debug("JucePlugin::~JucePlugin()");
  34. pData->singleMutex.lock();
  35. pData->masterMutex.lock();
  36. if (pData->client != nullptr && pData->client->isActive())
  37. pData->client->deactivate();
  38. }
  39. // -------------------------------------------------------------------
  40. // Information (base)
  41. PluginType getType() const override
  42. {
  43. return PLUGIN_CSOUND;
  44. }
  45. private:
  46. VSTPluginFormat format;
  47. CARLA_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(JucePlugin)
  48. };
  49. #endif
  50. CARLA_BACKEND_END_NAMESPACE
  51. #endif
  52. CARLA_BACKEND_START_NAMESPACE
  53. CarlaPlugin* CarlaPlugin::newJuce(const Initializer& init)
  54. {
  55. carla_debug("CarlaPlugin::newJuce({%p, \"%s\", \"%s\", \"%s\"})", init.engine, init.filename, init.name, init.label);
  56. #if 0 //def HAVE_JUCE
  57. JucePlugin* const plugin(new JucePlugin(init.engine, init.id));
  58. //if (! plugin->init(init.filename, init.name, init.label))
  59. {
  60. delete plugin;
  61. return nullptr;
  62. }
  63. plugin->reload();
  64. if (init.engine->getProccessMode() == ENGINE_PROCESS_MODE_CONTINUOUS_RACK && ! plugin->canRunInRack())
  65. {
  66. init.engine->setLastError("Carla's rack mode can only work with Stereo VST3 plugins, sorry!");
  67. delete plugin;
  68. return nullptr;
  69. }
  70. return plugin;
  71. #else
  72. init.engine->setLastError("Juce support not available");
  73. return nullptr;
  74. #endif
  75. }
  76. CARLA_BACKEND_END_NAMESPACE