From 0018a0ce4482e5768cbc8031f077c6c35bc943d0 Mon Sep 17 00:00:00 2001 From: falkTX Date: Tue, 25 Nov 2014 18:41:56 +0000 Subject: [PATCH] Rename some files; More makefile work --- source/backend/CarlaBackend.h | 4 +- source/backend/CarlaEngine.hpp | 2 +- source/backend/CarlaHostCommon.cpp | 4 +- source/backend/CarlaPlugin.hpp | 2 +- source/backend/CarlaStandalone.cpp | 16 +- source/backend/engine/CarlaEngine.cpp | 20 +-- source/backend/engine/CarlaEngineData.cpp | 8 +- .../{AuPlugin.cpp => CarlaPluginAU.cpp} | 0 ...BridgePlugin.cpp => CarlaPluginBridge.cpp} | 0 .../{DssiPlugin.cpp => CarlaPluginDSSI.cpp} | 44 ++--- ...thPlugin.cpp => CarlaPluginFluidSynth.cpp} | 32 ++-- .../{JucePlugin.cpp => CarlaPluginJuce.cpp} | 38 ++--- ...LadspaPlugin.cpp => CarlaPluginLADSPA.cpp} | 32 ++-- .../{Lv2Plugin.cpp => CarlaPluginLV2.cpp} | 156 +++++++++--------- ...Plugin.cpp => CarlaPluginLinuxSampler.cpp} | 30 ++-- ...NativePlugin.cpp => CarlaPluginNative.cpp} | 44 ++--- source/backend/plugin/CarlaPluginThread.cpp | 16 +- source/backend/plugin/CarlaPluginThread.hpp | 2 +- .../{VstPlugin.cpp => CarlaPluginVST2.cpp} | 72 ++++---- .../{Vst3Plugin.cpp => CarlaPluginVST3.cpp} | 0 source/backend/plugin/Makefile | 26 +-- source/bridges-plugin/Makefile | 34 ++-- source/carla_backend.py | 6 +- source/carla_database.py | 68 ++++---- source/carla_host.py | 4 +- source/carla_settings.py | 34 ++-- source/carla_shared.py | 38 ++--- source/carla_utils.py | 12 +- source/carla_widgets.py | 2 +- source/discovery/Makefile | 10 -- source/discovery/carla-discovery.cpp | 8 +- source/frontend/carla_shared.hpp | 2 +- source/modules/native-plugins/Makefile | 15 +- source/utils/CarlaBackendUtils.hpp | 18 +- source/utils/CarlaStateUtils.cpp | 2 +- 35 files changed, 393 insertions(+), 408 deletions(-) rename source/backend/plugin/{AuPlugin.cpp => CarlaPluginAU.cpp} (100%) rename source/backend/plugin/{BridgePlugin.cpp => CarlaPluginBridge.cpp} (100%) rename source/backend/plugin/{DssiPlugin.cpp => CarlaPluginDSSI.cpp} (98%) rename source/backend/plugin/{FluidSynthPlugin.cpp => CarlaPluginFluidSynth.cpp} (97%) rename source/backend/plugin/{JucePlugin.cpp => CarlaPluginJuce.cpp} (97%) rename source/backend/plugin/{LadspaPlugin.cpp => CarlaPluginLADSPA.cpp} (98%) rename source/backend/plugin/{Lv2Plugin.cpp => CarlaPluginLV2.cpp} (97%) rename source/backend/plugin/{LinuxSamplerPlugin.cpp => CarlaPluginLinuxSampler.cpp} (96%) rename source/backend/plugin/{NativePlugin.cpp => CarlaPluginNative.cpp} (98%) rename source/backend/plugin/{VstPlugin.cpp => CarlaPluginVST2.cpp} (97%) rename source/backend/plugin/{Vst3Plugin.cpp => CarlaPluginVST3.cpp} (100%) diff --git a/source/backend/CarlaBackend.h b/source/backend/CarlaBackend.h index 3ce069e47..ebdc3ca6c 100644 --- a/source/backend/CarlaBackend.h +++ b/source/backend/CarlaBackend.h @@ -465,9 +465,9 @@ typedef enum { PLUGIN_LV2 = 4, /*! - * VST plugin. + * VST2 plugin. */ - PLUGIN_VST = 5, + PLUGIN_VST2 = 5, /*! * VST3 plugin. diff --git a/source/backend/CarlaEngine.hpp b/source/backend/CarlaEngine.hpp index f657dcf1a..a732dff0a 100644 --- a/source/backend/CarlaEngine.hpp +++ b/source/backend/CarlaEngine.hpp @@ -241,7 +241,7 @@ struct CARLA_API EngineOptions { const char* pathLADSPA; const char* pathDSSI; const char* pathLV2; - const char* pathVST; + const char* pathVST2; const char* pathVST3; const char* pathAU; const char* pathGIG; diff --git a/source/backend/CarlaHostCommon.cpp b/source/backend/CarlaHostCommon.cpp index 3fedf0880..230cd0364 100644 --- a/source/backend/CarlaHostCommon.cpp +++ b/source/backend/CarlaHostCommon.cpp @@ -139,9 +139,9 @@ const char* carla_get_complete_license_text() "
  • DSSI plugin support
  • " "
  • LV2 plugin support
  • " #ifdef VESTIGE_HEADER - "
  • VST plugin support using VeSTige header by Javier Serrano Polo
  • " + "
  • VST2 plugin support using VeSTige header by Javier Serrano Polo
  • " #else - "
  • VST plugin support using official VST SDK 2.4 [1]
  • " + "
  • VST2 plugin support using official VST SDK 2.4 [1]
  • " #endif #if defined(CARLA_OS_MAC) || defined(CARLA_OS_WIN) "
  • VST3 plugin support using official VST SDK 3.6 [1]
  • " diff --git a/source/backend/CarlaPlugin.hpp b/source/backend/CarlaPlugin.hpp index 4dbf770c6..3b3c54852 100644 --- a/source/backend/CarlaPlugin.hpp +++ b/source/backend/CarlaPlugin.hpp @@ -910,7 +910,7 @@ public: static CarlaPlugin* newLADSPA(const Initializer& init, const LADSPA_RDF_Descriptor* const rdfDescriptor); static CarlaPlugin* newDSSI(const Initializer& init); static CarlaPlugin* newLV2(const Initializer& init); - static CarlaPlugin* newVST(const Initializer& init); + static CarlaPlugin* newVST2(const Initializer& init); static CarlaPlugin* newVST3(const Initializer& init); static CarlaPlugin* newAU(const Initializer& init); diff --git a/source/backend/CarlaStandalone.cpp b/source/backend/CarlaStandalone.cpp index 9c72bc365..45fabc075 100644 --- a/source/backend/CarlaStandalone.cpp +++ b/source/backend/CarlaStandalone.cpp @@ -478,8 +478,8 @@ bool carla_engine_init(const char* driverName, const char* clientName) if (gStandalone.engineOptions.pathLV2 != nullptr) gStandalone.engine->setOption(CB::ENGINE_OPTION_PLUGIN_PATH, CB::PLUGIN_LV2, gStandalone.engineOptions.pathLV2); - if (gStandalone.engineOptions.pathVST != nullptr) - gStandalone.engine->setOption(CB::ENGINE_OPTION_PLUGIN_PATH, CB::PLUGIN_VST, gStandalone.engineOptions.pathVST); + if (gStandalone.engineOptions.pathVST2 != nullptr) + gStandalone.engine->setOption(CB::ENGINE_OPTION_PLUGIN_PATH, CB::PLUGIN_VST2, gStandalone.engineOptions.pathVST2); if (gStandalone.engineOptions.pathVST3 != nullptr) gStandalone.engine->setOption(CB::ENGINE_OPTION_PLUGIN_PATH, CB::PLUGIN_VST3, gStandalone.engineOptions.pathVST3); @@ -584,8 +584,8 @@ bool carla_engine_init_bridge(const char audioBaseName[6+1], const char rtBaseNa if (const char* const pathLV2 = std::getenv("ENGINE_OPTION_PLUGIN_PATH_LV2")) gStandalone.engine->setOption(CB::ENGINE_OPTION_PLUGIN_PATH, CB::PLUGIN_LV2, pathLV2); - if (const char* const pathVST = std::getenv("ENGINE_OPTION_PLUGIN_PATH_VST")) - gStandalone.engine->setOption(CB::ENGINE_OPTION_PLUGIN_PATH, CB::PLUGIN_VST, pathVST); + if (const char* const pathVST2 = std::getenv("ENGINE_OPTION_PLUGIN_PATH_VST2")) + gStandalone.engine->setOption(CB::ENGINE_OPTION_PLUGIN_PATH, CB::PLUGIN_VST2, pathVST2); if (const char* const pathVST3 = std::getenv("ENGINE_OPTION_PLUGIN_PATH_VST3")) gStandalone.engine->setOption(CB::ENGINE_OPTION_PLUGIN_PATH, CB::PLUGIN_VST3, pathVST3); @@ -796,10 +796,10 @@ void carla_set_engine_option(EngineOption option, int value, const char* valueSt delete[] gStandalone.engineOptions.pathLV2; gStandalone.engineOptions.pathLV2 = carla_strdup_safe(valueStr); break; - case CB::PLUGIN_VST: - if (gStandalone.engineOptions.pathVST != nullptr) - delete[] gStandalone.engineOptions.pathVST; - gStandalone.engineOptions.pathVST = carla_strdup_safe(valueStr); + case CB::PLUGIN_VST2: + if (gStandalone.engineOptions.pathVST2 != nullptr) + delete[] gStandalone.engineOptions.pathVST2; + gStandalone.engineOptions.pathVST2 = carla_strdup_safe(valueStr); break; case CB::PLUGIN_VST3: if (gStandalone.engineOptions.pathVST3 != nullptr) diff --git a/source/backend/engine/CarlaEngine.cpp b/source/backend/engine/CarlaEngine.cpp index 356243b98..b42e5c0ac 100644 --- a/source/backend/engine/CarlaEngine.cpp +++ b/source/backend/engine/CarlaEngine.cpp @@ -481,8 +481,8 @@ bool CarlaEngine::addPlugin(const BinaryType btype, const PluginType ptype, cons plugin = CarlaPlugin::newLV2(initializer); break; - case PLUGIN_VST: - plugin = CarlaPlugin::newVST(initializer); + case PLUGIN_VST2: + plugin = CarlaPlugin::newVST2(initializer); break; case PLUGIN_VST3: @@ -1315,13 +1315,13 @@ void CarlaEngine::setOption(const EngineOption option, const int value, const ch else pData->options.pathLV2 = nullptr; break; - case PLUGIN_VST: - if (pData->options.pathVST != nullptr) - delete[] pData->options.pathVST; + case PLUGIN_VST2: + if (pData->options.pathVST2 != nullptr) + delete[] pData->options.pathVST2; if (valueStr != nullptr) - pData->options.pathVST = carla_strdup_safe(valueStr); + pData->options.pathVST2 = carla_strdup_safe(valueStr); else - pData->options.pathVST = nullptr; + pData->options.pathVST2 = nullptr; break; case PLUGIN_VST3: if (pData->options.pathVST3 != nullptr) @@ -1574,7 +1574,7 @@ void CarlaEngine::saveProjectInternal(juce::MemoryOutputStream& outStream) const outSettings << " " << xmlSafeString(options.pathLADSPA, true) << "\n"; outSettings << " " << xmlSafeString(options.pathDSSI, true) << "\n"; outSettings << " " << xmlSafeString(options.pathLV2, true) << "\n"; - outSettings << " " << xmlSafeString(options.pathVST, true) << "\n"; + outSettings << " " << xmlSafeString(options.pathVST2, true) << "\n"; outSettings << " " << xmlSafeString(options.pathVST3, true) << "\n"; outSettings << " " << xmlSafeString(options.pathAU, true) << "\n"; outSettings << " " << xmlSafeString(options.pathGIG, true) << "\n"; @@ -1747,10 +1747,10 @@ bool CarlaEngine::loadProjectInternal(juce::XmlDocument& xmlDoc) value = PLUGIN_LV2; valueStr = text.toRawUTF8(); } - else if (tag.equalsIgnoreCase("VST_PATH")) + else if (tag.equalsIgnoreCase("VST2_PATH")) { option = ENGINE_OPTION_PLUGIN_PATH; - value = PLUGIN_VST; + value = PLUGIN_VST2; valueStr = text.toRawUTF8(); } else if (tag.equalsIgnoreCase("VST3_PATH")) diff --git a/source/backend/engine/CarlaEngineData.cpp b/source/backend/engine/CarlaEngineData.cpp index c7c24eb37..44462be47 100644 --- a/source/backend/engine/CarlaEngineData.cpp +++ b/source/backend/engine/CarlaEngineData.cpp @@ -203,7 +203,7 @@ EngineOptions::EngineOptions() noexcept pathLADSPA(nullptr), pathDSSI(nullptr), pathLV2(nullptr), - pathVST(nullptr), + pathVST2(nullptr), pathVST3(nullptr), pathAU(nullptr), pathGIG(nullptr), @@ -240,10 +240,10 @@ EngineOptions::~EngineOptions() noexcept pathLV2 = nullptr; } - if (pathVST != nullptr) + if (pathVST2 != nullptr) { - delete[] pathVST; - pathVST = nullptr; + delete[] pathVST2; + pathVST2 = nullptr; } if (pathVST3 != nullptr) diff --git a/source/backend/plugin/AuPlugin.cpp b/source/backend/plugin/CarlaPluginAU.cpp similarity index 100% rename from source/backend/plugin/AuPlugin.cpp rename to source/backend/plugin/CarlaPluginAU.cpp diff --git a/source/backend/plugin/BridgePlugin.cpp b/source/backend/plugin/CarlaPluginBridge.cpp similarity index 100% rename from source/backend/plugin/BridgePlugin.cpp rename to source/backend/plugin/CarlaPluginBridge.cpp diff --git a/source/backend/plugin/DssiPlugin.cpp b/source/backend/plugin/CarlaPluginDSSI.cpp similarity index 98% rename from source/backend/plugin/DssiPlugin.cpp rename to source/backend/plugin/CarlaPluginDSSI.cpp index 0bfa5eaac..c875ff103 100644 --- a/source/backend/plugin/DssiPlugin.cpp +++ b/source/backend/plugin/CarlaPluginDSSI.cpp @@ -28,10 +28,10 @@ CARLA_BACKEND_START_NAMESPACE // ----------------------------------------------------- -class DssiPlugin : public CarlaPlugin +class CarlaPluginDSSI : public CarlaPlugin { public: - DssiPlugin(CarlaEngine* const engine, const uint id) noexcept + CarlaPluginDSSI(CarlaEngine* const engine, const uint id) noexcept : CarlaPlugin(engine, id), fHandle(nullptr), fHandle2(nullptr), @@ -44,16 +44,16 @@ public: fParamBuffers(nullptr), fLatencyChanged(false), fLatencyIndex(-1), - leakDetector_DssiPlugin() + leakDetector_CarlaPluginDSSI() { - carla_debug("DssiPlugin::DssiPlugin(%p, %i)", engine, id); + carla_debug("CarlaPluginDSSI::CarlaPluginDSSI(%p, %i)", engine, id); pData->osc.thread.setMode(CarlaPluginThread::PLUGIN_THREAD_DSSI_GUI); } - ~DssiPlugin() noexcept override + ~CarlaPluginDSSI() noexcept override { - carla_debug("DssiPlugin::~DssiPlugin()"); + carla_debug("CarlaPluginDSSI::~CarlaPluginDSSI()"); // close UI if (pData->hints & PLUGIN_HAS_CUSTOM_UI) @@ -162,7 +162,7 @@ public: try { ret = fDssiDescriptor->get_custom_data(fHandle, dataPtr, &dataSize); - } CARLA_SAFE_EXCEPTION_RETURN("DssiPlugin::getChunkData", 0); + } CARLA_SAFE_EXCEPTION_RETURN("CarlaPluginDSSI::getChunkData", 0); return (ret != 0) ? dataSize : 0; } @@ -315,10 +315,10 @@ public: CARLA_SAFE_ASSERT_RETURN(type != nullptr && type[0] != '\0',); CARLA_SAFE_ASSERT_RETURN(key != nullptr && key[0] != '\0',); CARLA_SAFE_ASSERT_RETURN(value != nullptr,); - carla_debug("DssiPlugin::setCustomData(%s, %s, %s, %s)", type, key, value, bool2str(sendGui)); + carla_debug("CarlaPluginDSSI::setCustomData(%s, %s, %s, %s)", type, key, value, bool2str(sendGui)); if (std::strcmp(type, CUSTOM_DATA_TYPE_STRING) != 0) - return carla_stderr2("DssiPlugin::setCustomData(\"%s\", \"%s\", \"%s\", %s) - type is not string", type, key, value, bool2str(sendGui)); + return carla_stderr2("CarlaPluginDSSI::setCustomData(\"%s\", \"%s\", \"%s\", %s) - type is not string", type, key, value, bool2str(sendGui)); if (fDssiDescriptor->configure != nullptr) { @@ -362,7 +362,7 @@ public: try { fDssiDescriptor->set_custom_data(fHandle, const_cast(data), static_cast(dataSize)); - } CARLA_SAFE_EXCEPTION("DssiPlugin::setChunkData"); + } CARLA_SAFE_EXCEPTION("CarlaPluginDSSI::setChunkData"); } #ifdef BUILD_BRIDGE @@ -468,7 +468,7 @@ public: CARLA_SAFE_ASSERT_RETURN(fDescriptor != nullptr,); CARLA_SAFE_ASSERT_RETURN(fDssiDescriptor != nullptr,); CARLA_SAFE_ASSERT_RETURN(fHandle != nullptr,); - carla_debug("DssiPlugin::reload() - start"); + carla_debug("CarlaPluginDSSI::reload() - start"); const EngineProcessMode processMode(pData->engine->getProccessMode()); @@ -944,12 +944,12 @@ public: if (pData->active) activate(); - carla_debug("DssiPlugin::reload() - end"); + carla_debug("CarlaPluginDSSI::reload() - end"); } void reloadPrograms(const bool doInit) override { - carla_debug("DssiPlugin::reloadPrograms(%s)", bool2str(doInit)); + carla_debug("CarlaPluginDSSI::reloadPrograms(%s)", bool2str(doInit)); const uint32_t oldCount = pData->midiprog.count; const int32_t current = pData->midiprog.current; @@ -1763,7 +1763,7 @@ public: void bufferSizeChanged(const uint32_t newBufferSize) override { CARLA_ASSERT_INT(newBufferSize > 0, newBufferSize); - carla_debug("DssiPlugin::bufferSizeChanged(%i) - start", newBufferSize); + carla_debug("CarlaPluginDSSI::bufferSizeChanged(%i) - start", newBufferSize); for (uint32_t i=0; i < pData->audioIn.count; ++i) { @@ -1832,18 +1832,18 @@ public: } } - carla_debug("DssiPlugin::bufferSizeChanged(%i) - end", newBufferSize); + carla_debug("CarlaPluginDSSI::bufferSizeChanged(%i) - end", newBufferSize); } void sampleRateChanged(const double newSampleRate) override { CARLA_ASSERT_INT(newSampleRate > 0.0, newSampleRate); - carla_debug("DssiPlugin::sampleRateChanged(%g) - start", newSampleRate); + carla_debug("CarlaPluginDSSI::sampleRateChanged(%g) - start", newSampleRate); // TODO (void)newSampleRate; - carla_debug("DssiPlugin::sampleRateChanged(%g) - end", newSampleRate); + carla_debug("CarlaPluginDSSI::sampleRateChanged(%g) - end", newSampleRate); } // ------------------------------------------------------------------- @@ -1851,7 +1851,7 @@ public: void clearBuffers() noexcept override { - carla_debug("DssiPlugin::clearBuffers() - start"); + carla_debug("CarlaPluginDSSI::clearBuffers() - start"); if (fAudioInBuffers != nullptr) { @@ -1891,7 +1891,7 @@ public: CarlaPlugin::clearBuffers(); - carla_debug("DssiPlugin::clearBuffers() - end"); + carla_debug("CarlaPluginDSSI::clearBuffers() - end"); } // ------------------------------------------------------------------- @@ -2321,10 +2321,10 @@ private: // ------------------------------------------------------------------- - CARLA_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(DssiPlugin) + CARLA_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(CarlaPluginDSSI) }; -LinkedList DssiPlugin::sMultiSynthList; +LinkedList CarlaPluginDSSI::sMultiSynthList; // ------------------------------------------------------------------------------------------------------------------- @@ -2332,7 +2332,7 @@ CarlaPlugin* CarlaPlugin::newDSSI(const Initializer& init) { carla_debug("CarlaPlugin::newDSSI({%p, \"%s\", \"%s\", \"%s\", " P_INT64 "})", init.engine, init.filename, init.name, init.label, init.uniqueId); - DssiPlugin* const plugin(new DssiPlugin(init.engine, init.id)); + CarlaPluginDSSI* const plugin(new CarlaPluginDSSI(init.engine, init.id)); if (! plugin->init(init.filename, init.name, init.label)) { diff --git a/source/backend/plugin/FluidSynthPlugin.cpp b/source/backend/plugin/CarlaPluginFluidSynth.cpp similarity index 97% rename from source/backend/plugin/FluidSynthPlugin.cpp rename to source/backend/plugin/CarlaPluginFluidSynth.cpp index f5b3dc701..e761f56af 100644 --- a/source/backend/plugin/FluidSynthPlugin.cpp +++ b/source/backend/plugin/CarlaPluginFluidSynth.cpp @@ -39,10 +39,10 @@ CARLA_BACKEND_START_NAMESPACE // ----------------------------------------------------- -class FluidSynthPlugin : public CarlaPlugin +class CarlaPluginFluidSynth : public CarlaPlugin { public: - FluidSynthPlugin(CarlaEngine* const engine, const uint id, const bool use16Outs) + CarlaPluginFluidSynth(CarlaEngine* const engine, const uint id, const bool use16Outs) : CarlaPlugin(engine, id), kUse16Outs(use16Outs), fSettings(nullptr), @@ -50,9 +50,9 @@ public: fSynthId(0), fAudio16Buffers(nullptr), fLabel(nullptr), - leakDetector_FluidSynthPlugin() + leakDetector_CarlaPluginFluidSynth() { - carla_debug("FluidSynthPlugin::FluidSynthPlugin(%p, %i, %s)", engine, id, bool2str(use16Outs)); + carla_debug("CarlaPluginFluidSynth::CarlaPluginFluidSynth(%p, %i, %s)", engine, id, bool2str(use16Outs)); FloatVectorOperations::clear(fParamBuffers, FluidSynthParametersMax); carla_fill(fCurMidiProgs, 0, MAX_MIDI_CHANNELS); @@ -91,9 +91,9 @@ public: fluid_synth_set_interp_method(fSynth, i, FLUID_INTERP_DEFAULT); } - ~FluidSynthPlugin() override + ~CarlaPluginFluidSynth() override { - carla_debug("FluidSynthPlugin::~FluidSynthPlugin()"); + carla_debug("CarlaPluginFluidSynth::~CarlaPluginFluidSynth()"); pData->singleMutex.lock(); pData->masterMutex.lock(); @@ -460,13 +460,13 @@ public: CARLA_SAFE_ASSERT_RETURN(type != nullptr && type[0] != '\0',); CARLA_SAFE_ASSERT_RETURN(key != nullptr && key[0] != '\0',); CARLA_SAFE_ASSERT_RETURN(value != nullptr && value[0] != '\0',); - carla_debug("FluidSynthPlugin::setCustomData(%s, \"%s\", \"%s\", %s)", type, key, value, bool2str(sendGui)); + carla_debug("CarlaPluginFluidSynth::setCustomData(%s, \"%s\", \"%s\", %s)", type, key, value, bool2str(sendGui)); if (std::strcmp(type, CUSTOM_DATA_TYPE_STRING) != 0) - return carla_stderr2("FluidSynthPlugin::setCustomData(\"%s\", \"%s\", \"%s\", %s) - type is not string", type, key, value, bool2str(sendGui)); + return carla_stderr2("CarlaPluginFluidSynth::setCustomData(\"%s\", \"%s\", \"%s\", %s) - type is not string", type, key, value, bool2str(sendGui)); if (std::strcmp(key, "midiPrograms") != 0) - return carla_stderr2("FluidSynthPlugin::setCustomData(\"%s\", \"%s\", \"%s\", %s) - type is not string", type, key, value, bool2str(sendGui)); + return carla_stderr2("CarlaPluginFluidSynth::setCustomData(\"%s\", \"%s\", \"%s\", %s) - type is not string", type, key, value, bool2str(sendGui)); StringArray midiProgramList(StringArray::fromTokens(value, ":", "")); @@ -534,7 +534,7 @@ public: { CARLA_SAFE_ASSERT_RETURN(pData->engine != nullptr,); CARLA_SAFE_ASSERT_RETURN(fSynth != nullptr,); - carla_debug("FluidSynthPlugin::reload() - start"); + carla_debug("CarlaPluginFluidSynth::reload() - start"); const EngineProcessMode processMode(pData->engine->getProccessMode()); @@ -880,12 +880,12 @@ public: if (pData->active) activate(); - carla_debug("FluidSynthPlugin::reload() - end"); + carla_debug("CarlaPluginFluidSynth::reload() - end"); } void reloadPrograms(const bool doInit) override { - carla_debug("FluidSynthPlugin::reloadPrograms(%s)", bool2str(doInit)); + carla_debug("CarlaPluginFluidSynth::reloadPrograms(%s)", bool2str(doInit)); // save drum info in case we have one program for it bool hasDrums = false; @@ -1510,7 +1510,7 @@ public: void clearBuffers() noexcept override { - carla_debug("FluidSynthPlugin::clearBuffers() - start"); + carla_debug("CarlaPluginFluidSynth::clearBuffers() - start"); if (fAudio16Buffers != nullptr) { @@ -1529,7 +1529,7 @@ public: CarlaPlugin::clearBuffers(); - carla_debug("FluidSynthPlugin::clearBuffers() - end"); + carla_debug("CarlaPluginFluidSynth::clearBuffers() - end"); } // ------------------------------------------------------------------- @@ -1658,7 +1658,7 @@ private: const char* fLabel; - CARLA_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(FluidSynthPlugin) + CARLA_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(CarlaPluginFluidSynth) }; CARLA_BACKEND_END_NAMESPACE @@ -1686,7 +1686,7 @@ CarlaPlugin* CarlaPlugin::newFluidSynth(const Initializer& init, const bool use1 return nullptr; } - FluidSynthPlugin* const plugin(new FluidSynthPlugin(init.engine, init.id, use16Outs)); + CarlaPluginFluidSynth* const plugin(new CarlaPluginFluidSynth(init.engine, init.id, use16Outs)); if (! plugin->init(init.filename, init.name, init.label)) { diff --git a/source/backend/plugin/JucePlugin.cpp b/source/backend/plugin/CarlaPluginJuce.cpp similarity index 97% rename from source/backend/plugin/JucePlugin.cpp rename to source/backend/plugin/CarlaPluginJuce.cpp index 015333697..23e5d02e0 100644 --- a/source/backend/plugin/JucePlugin.cpp +++ b/source/backend/plugin/CarlaPluginJuce.cpp @@ -22,7 +22,7 @@ #include "CarlaBackendUtils.hpp" #include "CarlaMathUtils.hpp" -#include "JucePluginWindow.hpp" +#include "CarlaPluginJuceWindow.hpp" #include "juce_audio_processors.h" @@ -32,12 +32,12 @@ CARLA_BACKEND_START_NAMESPACE // ----------------------------------------------------- -class JucePlugin : public CarlaPlugin, - public AudioPlayHead, - public AudioProcessorListener +class CarlaPluginJuce : public CarlaPlugin, + private AudioPlayHead, + private AudioProcessorListener { public: - JucePlugin(CarlaEngine* const engine, const uint id) + CarlaPluginJuce(CarlaEngine* const engine, const uint id) : CarlaPlugin(engine, id), fDesc(), fInstance(nullptr), @@ -48,18 +48,18 @@ public: fChunk(), fUniqueId(nullptr), fWindow(), - leakDetector_JucePlugin() + leakDetector_CarlaPluginJuce() { - carla_debug("JucePlugin::JucePlugin(%p, %i)", engine, id); + carla_debug("CarlaPluginJuce::CarlaPluginJuce(%p, %i)", engine, id); fMidiBuffer.ensureSize(2048); fMidiBuffer.clear(); fPosInfo.resetToDefault(); } - ~JucePlugin() override + ~CarlaPluginJuce() override { - carla_debug("JucePlugin::~JucePlugin()"); + carla_debug("CarlaPluginJuce::~CarlaPluginJuce()"); // close UI if (pData->hints & PLUGIN_HAS_CUSTOM_UI) @@ -125,7 +125,7 @@ public: try { fChunk.reset(); fInstance->getStateInformation(fChunk); - } CARLA_SAFE_EXCEPTION_RETURN("JucePlugin::getChunkData", 0); + } CARLA_SAFE_EXCEPTION_RETURN("CarlaPluginJuce::getChunkData", 0); if (const std::size_t size = fChunk.getSize()) { @@ -302,7 +302,7 @@ public: String uiName(pData->name); uiName += " (GUI)"; - fWindow = new JucePluginWindow(); + fWindow = new CarlaPluginJuceWindow(); fWindow->setName(uiName); } @@ -342,7 +342,7 @@ public: { CARLA_SAFE_ASSERT_RETURN(pData->engine != nullptr,); CARLA_SAFE_ASSERT_RETURN(fInstance != nullptr,); - carla_debug("JucePlugin::reload() - start"); + carla_debug("CarlaPluginJuce::reload() - start"); const EngineProcessMode processMode(pData->engine->getProccessMode()); @@ -564,12 +564,12 @@ public: if (pData->active) activate(); - carla_debug("JucePlugin::reload() - end"); + carla_debug("CarlaPluginJuce::reload() - end"); } void reloadPrograms(const bool doInit) override { - carla_debug("JucePlugin::reloadPrograms(%s)", bool2str(doInit)); + carla_debug("CarlaPluginJuce::reloadPrograms(%s)", bool2str(doInit)); const uint32_t oldCount = pData->prog.count; const int32_t current = pData->prog.current; @@ -1058,7 +1058,7 @@ public: void bufferSizeChanged(const uint32_t newBufferSize) override { CARLA_ASSERT_INT(newBufferSize > 0, newBufferSize); - carla_debug("JucePlugin::bufferSizeChanged(%i)", newBufferSize); + carla_debug("CarlaPluginJuce::bufferSizeChanged(%i)", newBufferSize); fAudioBuffer.setSize(static_cast(std::max(pData->audioIn.count, pData->audioOut.count)), static_cast(newBufferSize)); @@ -1072,7 +1072,7 @@ public: void sampleRateChanged(const double newSampleRate) override { CARLA_ASSERT_INT(newSampleRate > 0.0, newSampleRate); - carla_debug("JucePlugin::sampleRateChanged(%g)", newSampleRate); + carla_debug("CarlaPluginJuce::sampleRateChanged(%g)", newSampleRate); if (pData->active) { @@ -1249,9 +1249,9 @@ private: const char* fUniqueId; - ScopedPointer fWindow; + ScopedPointer fWindow; - CARLA_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(JucePlugin) + CARLA_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(CarlaPluginJuce) }; CARLA_BACKEND_END_NAMESPACE @@ -1267,7 +1267,7 @@ CarlaPlugin* CarlaPlugin::newJuce(const Initializer& init, const char* const for carla_debug("CarlaPlugin::newJuce({%p, \"%s\", \"%s\", \"%s\", " P_INT64 "}, %s)", init.engine, init.filename, init.name, init.label, init.uniqueId, format); #if (defined(CARLA_OS_MAC) || defined(CARLA_OS_WIN)) - JucePlugin* const plugin(new JucePlugin(init.engine, init.id)); + CarlaPluginJuce* const plugin(new CarlaPluginJuce(init.engine, init.id)); if (! plugin->init(init.filename, init.name, init.label, init.uniqueId, format)) { diff --git a/source/backend/plugin/LadspaPlugin.cpp b/source/backend/plugin/CarlaPluginLADSPA.cpp similarity index 98% rename from source/backend/plugin/LadspaPlugin.cpp rename to source/backend/plugin/CarlaPluginLADSPA.cpp index 9ed14f413..2e0c16197 100644 --- a/source/backend/plugin/LadspaPlugin.cpp +++ b/source/backend/plugin/CarlaPluginLADSPA.cpp @@ -25,10 +25,10 @@ CARLA_BACKEND_START_NAMESPACE // ----------------------------------------------------- -class LadspaPlugin : public CarlaPlugin +class CarlaPluginLADSPA : public CarlaPlugin { public: - LadspaPlugin(CarlaEngine* const engine, const uint id) noexcept + CarlaPluginLADSPA(CarlaEngine* const engine, const uint id) noexcept : CarlaPlugin(engine, id), fHandle(nullptr), fHandle2(nullptr), @@ -39,14 +39,14 @@ public: fParamBuffers(nullptr), fLatencyChanged(false), fLatencyIndex(-1), - leakDetector_LadspaPlugin() + leakDetector_CarlaPluginLADSPA() { - carla_debug("LadspaPlugin::LadspaPlugin(%p, %i)", engine, id); + carla_debug("CarlaPluginLADSPA::CarlaPluginLADSPA(%p, %i)", engine, id); } - ~LadspaPlugin() noexcept override + ~CarlaPluginLADSPA() noexcept override { - carla_debug("LadspaPlugin::~LadspaPlugin()"); + carla_debug("CarlaPluginLADSPA::~CarlaPluginLADSPA()"); pData->singleMutex.lock(); pData->masterMutex.lock(); @@ -441,7 +441,7 @@ public: CARLA_SAFE_ASSERT_RETURN(pData->engine != nullptr,); CARLA_SAFE_ASSERT_RETURN(fDescriptor != nullptr,); CARLA_SAFE_ASSERT_RETURN(fHandle != nullptr,); - carla_debug("LadspaPlugin::reload() - start"); + carla_debug("CarlaPluginLADSPA::reload() - start"); const EngineProcessMode processMode(pData->engine->getProccessMode()); @@ -900,7 +900,7 @@ public: if (pData->active) activate(); - carla_debug("LadspaPlugin::reload() - end"); + carla_debug("CarlaPluginLADSPA::reload() - end"); } // ------------------------------------------------------------------- @@ -1364,7 +1364,7 @@ public: void bufferSizeChanged(const uint32_t newBufferSize) override { CARLA_ASSERT_INT(newBufferSize > 0, newBufferSize); - carla_debug("LadspaPlugin::bufferSizeChanged(%i) - start", newBufferSize); + carla_debug("CarlaPluginLADSPA::bufferSizeChanged(%i) - start", newBufferSize); for (uint32_t i=0; i < pData->audioIn.count; ++i) { @@ -1433,18 +1433,18 @@ public: } } - carla_debug("LadspaPlugin::bufferSizeChanged(%i) - end", newBufferSize); + carla_debug("CarlaPluginLADSPA::bufferSizeChanged(%i) - end", newBufferSize); } void sampleRateChanged(const double newSampleRate) override { CARLA_ASSERT_INT(newSampleRate > 0.0, newSampleRate); - carla_debug("LadspaPlugin::sampleRateChanged(%g) - start", newSampleRate); + carla_debug("CarlaPluginLADSPA::sampleRateChanged(%g) - start", newSampleRate); // TODO (void)newSampleRate; - carla_debug("LadspaPlugin::sampleRateChanged(%g) - end", newSampleRate); + carla_debug("CarlaPluginLADSPA::sampleRateChanged(%g) - end", newSampleRate); } // ------------------------------------------------------------------- @@ -1452,7 +1452,7 @@ public: void clearBuffers() noexcept override { - carla_debug("LadspaPlugin::clearBuffers() - start"); + carla_debug("CarlaPluginLADSPA::clearBuffers() - start"); if (fAudioInBuffers != nullptr) { @@ -1492,7 +1492,7 @@ public: CarlaPlugin::clearBuffers(); - carla_debug("LadspaPlugin::clearBuffers() - end"); + carla_debug("CarlaPluginLADSPA::clearBuffers() - end"); } // ------------------------------------------------------------------- @@ -1739,7 +1739,7 @@ private: // ------------------------------------------------------------------- - CARLA_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(LadspaPlugin) + CARLA_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(CarlaPluginLADSPA) }; // ------------------------------------------------------------------------------------------------------------------- @@ -1748,7 +1748,7 @@ CarlaPlugin* CarlaPlugin::newLADSPA(const Initializer& init, const LADSPA_RDF_De { carla_debug("CarlaPlugin::newLADSPA({%p, \"%s\", \"%s\", \"%s\", " P_INT64 "}, %p)", init.engine, init.filename, init.name, init.label, init.uniqueId, rdfDescriptor); - LadspaPlugin* const plugin(new LadspaPlugin(init.engine, init.id)); + CarlaPluginLADSPA* const plugin(new CarlaPluginLADSPA(init.engine, init.id)); if (! plugin->init(init.filename, init.name, init.label, rdfDescriptor)) { diff --git a/source/backend/plugin/Lv2Plugin.cpp b/source/backend/plugin/CarlaPluginLV2.cpp similarity index 97% rename from source/backend/plugin/Lv2Plugin.cpp rename to source/backend/plugin/CarlaPluginLV2.cpp index 2f878c5fe..2bd816896 100644 --- a/source/backend/plugin/Lv2Plugin.cpp +++ b/source/backend/plugin/CarlaPluginLV2.cpp @@ -207,19 +207,19 @@ struct Lv2EventData { CARLA_DECLARE_NON_COPY_STRUCT(Lv2EventData) }; -struct Lv2PluginEventData { +struct CarlaPluginLV2EventData { uint32_t count; Lv2EventData* data; Lv2EventData* ctrl; // default port, either this->data[x] or pData->portIn/Out uint32_t ctrlIndex; - Lv2PluginEventData() noexcept + CarlaPluginLV2EventData() noexcept : count(0), data(nullptr), ctrl(nullptr), ctrlIndex(0) {} - ~Lv2PluginEventData() noexcept + ~CarlaPluginLV2EventData() noexcept { CARLA_SAFE_ASSERT_INT(count == 0, count); CARLA_SAFE_ASSERT(data == nullptr); @@ -271,12 +271,12 @@ struct Lv2PluginEventData { } } - CARLA_DECLARE_NON_COPY_STRUCT(Lv2PluginEventData) + CARLA_DECLARE_NON_COPY_STRUCT(CarlaPluginLV2EventData) }; // ----------------------------------------------------- -struct Lv2PluginOptions { +struct CarlaPluginLV2Options { enum OptIndex { MaxBlockLenth = 0, MinBlockLenth, @@ -296,7 +296,7 @@ struct Lv2PluginOptions { const char* windowTitle; LV2_Options_Option opts[Count]; - Lv2PluginOptions() noexcept + CarlaPluginLV2Options() noexcept : maxBufferSize(0), minBufferSize(0), sequenceSize(MAX_DEFAULT_BUFFER_SIZE), @@ -361,7 +361,7 @@ struct Lv2PluginOptions { optNull.value = nullptr; } - ~Lv2PluginOptions() noexcept + ~CarlaPluginLV2Options() noexcept { LV2_Options_Option& optWindowTitle(opts[WindowTitle]); @@ -375,16 +375,16 @@ struct Lv2PluginOptions { } } - CARLA_DECLARE_NON_COPY_STRUCT(Lv2PluginOptions); + CARLA_DECLARE_NON_COPY_STRUCT(CarlaPluginLV2Options); }; // ----------------------------------------------------- -class Lv2Plugin : public CarlaPlugin, - CarlaPluginUI::CloseCallback +class CarlaPluginLV2 : public CarlaPlugin, + private CarlaPluginUI::CloseCallback { public: - Lv2Plugin(CarlaEngine* const engine, const uint id) + CarlaPluginLV2(CarlaEngine* const engine, const uint id) : CarlaPlugin(engine, id), fHandle(nullptr), fHandle2(nullptr), @@ -410,9 +410,9 @@ public: fLastTimeInfo(), fExt(), fUI(), - leakDetector_Lv2Plugin() + leakDetector_CarlaPluginLV2() { - carla_debug("Lv2Plugin::Lv2Plugin(%p, %i)", engine, id); + carla_debug("CarlaPluginLV2::CarlaPluginLV2(%p, %i)", engine, id); carla_fill(fFeatures, nullptr, kFeatureCountAll+1); @@ -453,9 +453,9 @@ public: pData->osc.thread.setMode(CarlaPluginThread::PLUGIN_THREAD_LV2_GUI); } - ~Lv2Plugin() override + ~CarlaPluginLV2() override { - carla_debug("Lv2Plugin::~Lv2Plugin()"); + carla_debug("CarlaPluginLV2::~CarlaPluginLV2()"); // close UI if (fUI.type != UI::TYPE_NULL) @@ -986,8 +986,8 @@ public: delete[] fLv2Options.windowTitle; fLv2Options.windowTitle = guiTitle.dup(); - fLv2Options.opts[Lv2PluginOptions::WindowTitle].size = (uint32_t)std::strlen(fLv2Options.windowTitle); - fLv2Options.opts[Lv2PluginOptions::WindowTitle].value = fLv2Options.windowTitle; + fLv2Options.opts[CarlaPluginLV2Options::WindowTitle].size = (uint32_t)std::strlen(fLv2Options.windowTitle); + fLv2Options.opts[CarlaPluginLV2Options::WindowTitle].value = fLv2Options.windowTitle; if (fFeatures[kFeatureIdExternalUi] != nullptr && fFeatures[kFeatureIdExternalUi]->data != nullptr) ((LV2_External_UI_Host*)fFeatures[kFeatureIdExternalUi]->data)->plugin_human_id = fLv2Options.windowTitle; @@ -1019,7 +1019,7 @@ public: CARLA_SAFE_ASSERT_RETURN(type != nullptr && type[0] != '\0',); CARLA_SAFE_ASSERT_RETURN(key != nullptr && key[0] != '\0',); CARLA_SAFE_ASSERT_RETURN(value != nullptr,); - carla_debug("Lv2Plugin::setCustomData(%s, %s, %s, %s)", type, key, value, bool2str(sendGui)); + carla_debug("CarlaPluginLV2::setCustomData(%s, %s, %s, %s)", type, key, value, bool2str(sendGui)); // we should only call state restore once // so inject this in CarlaPlugin::loadSaveState @@ -1048,22 +1048,22 @@ public: switch (status) { case LV2_STATE_SUCCESS: - carla_debug("Lv2Plugin::setCustomData(\"%s\", \"%s\", , %s) - success", type, key, bool2str(sendGui)); + carla_debug("CarlaPluginLV2::setCustomData(\"%s\", \"%s\", , %s) - success", type, key, bool2str(sendGui)); break; case LV2_STATE_ERR_UNKNOWN: - carla_stderr("Lv2Plugin::setCustomData(\"%s\", \"%s\", , %s) - unknown error", type, key, bool2str(sendGui)); + carla_stderr("CarlaPluginLV2::setCustomData(\"%s\", \"%s\", , %s) - unknown error", type, key, bool2str(sendGui)); break; case LV2_STATE_ERR_BAD_TYPE: - carla_stderr("Lv2Plugin::setCustomData(\"%s\", \"%s\", , %s) - error, bad type", type, key, bool2str(sendGui)); + carla_stderr("CarlaPluginLV2::setCustomData(\"%s\", \"%s\", , %s) - error, bad type", type, key, bool2str(sendGui)); break; case LV2_STATE_ERR_BAD_FLAGS: - carla_stderr("Lv2Plugin::setCustomData(\"%s\", \"%s\", , %s) - error, bad flags", type, key, bool2str(sendGui)); + carla_stderr("CarlaPluginLV2::setCustomData(\"%s\", \"%s\", , %s) - error, bad flags", type, key, bool2str(sendGui)); break; case LV2_STATE_ERR_NO_FEATURE: - carla_stderr("Lv2Plugin::setCustomData(\"%s\", \"%s\", , %s) - error, missing feature", type, key, bool2str(sendGui)); + carla_stderr("CarlaPluginLV2::setCustomData(\"%s\", \"%s\", , %s) - error, missing feature", type, key, bool2str(sendGui)); break; case LV2_STATE_ERR_NO_PROPERTY: - carla_stderr("Lv2Plugin::setCustomData(\"%s\", \"%s\", , %s) - error, missing property", type, key, bool2str(sendGui)); + carla_stderr("CarlaPluginLV2::setCustomData(\"%s\", \"%s\", , %s) - error, missing property", type, key, bool2str(sendGui)); break; } return; @@ -1397,7 +1397,7 @@ public: CARLA_SAFE_ASSERT_RETURN(fHandle != nullptr,); CARLA_SAFE_ASSERT_RETURN(fDescriptor != nullptr,); CARLA_SAFE_ASSERT_RETURN(fRdfDescriptor != nullptr,); - carla_debug("Lv2Plugin::reload() - start"); + carla_debug("CarlaPluginLV2::reload() - start"); const EngineProcessMode processMode(pData->engine->getProccessMode()); @@ -2282,12 +2282,12 @@ public: if (pData->active) activate(); - carla_debug("Lv2Plugin::reload() - end"); + carla_debug("CarlaPluginLV2::reload() - end"); } void reloadPrograms(const bool doInit) override { - carla_debug("Lv2Plugin::reloadPrograms(%s)", bool2str(doInit)); + carla_debug("CarlaPluginLV2::reloadPrograms(%s)", bool2str(doInit)); const uint32_t oldCount = pData->midiprog.count; const int32_t current = pData->midiprog.current; @@ -3530,7 +3530,7 @@ public: void bufferSizeChanged(const uint32_t newBufferSize) override { CARLA_ASSERT_INT(newBufferSize > 0, newBufferSize); - carla_debug("Lv2Plugin::bufferSizeChanged(%i) - start", newBufferSize); + carla_debug("CarlaPluginLV2::bufferSizeChanged(%i) - start", newBufferSize); for (uint32_t i=0; i < pData->audioIn.count; ++i) { @@ -3618,25 +3618,25 @@ public: if (fExt.options != nullptr && fExt.options->set != nullptr) { - fExt.options->set(fHandle, &fLv2Options.opts[Lv2PluginOptions::MaxBlockLenth]); - fExt.options->set(fHandle, &fLv2Options.opts[Lv2PluginOptions::MinBlockLenth]); + fExt.options->set(fHandle, &fLv2Options.opts[CarlaPluginLV2Options::MaxBlockLenth]); + fExt.options->set(fHandle, &fLv2Options.opts[CarlaPluginLV2Options::MinBlockLenth]); } } - carla_debug("Lv2Plugin::bufferSizeChanged(%i) - end", newBufferSize); + carla_debug("CarlaPluginLV2::bufferSizeChanged(%i) - end", newBufferSize); } void sampleRateChanged(const double newSampleRate) override { CARLA_ASSERT_INT(newSampleRate > 0.0, newSampleRate); - carla_debug("Lv2Plugin::sampleRateChanged(%g) - start", newSampleRate); + carla_debug("CarlaPluginLV2::sampleRateChanged(%g) - start", newSampleRate); if (! carla_compareFloats(fLv2Options.sampleRate, newSampleRate)) { fLv2Options.sampleRate = newSampleRate; if (fExt.options != nullptr && fExt.options->set != nullptr) - fExt.options->set(fHandle, &fLv2Options.opts[Lv2PluginOptions::SampleRate]); + fExt.options->set(fHandle, &fLv2Options.opts[CarlaPluginLV2Options::SampleRate]); } for (uint32_t k=0; k < pData->param.count; ++k) @@ -3649,7 +3649,7 @@ public: } } - carla_debug("Lv2Plugin::sampleRateChanged(%g) - end", newSampleRate); + carla_debug("CarlaPluginLV2::sampleRateChanged(%g) - end", newSampleRate); } void offlineModeChanged(const bool isOffline) override @@ -3678,7 +3678,7 @@ public: void clearBuffers() noexcept override { - carla_debug("Lv2Plugin::clearBuffers() - start"); + carla_debug("CarlaPluginLV2::clearBuffers() - start"); if (fAudioInBuffers != nullptr) { @@ -3751,7 +3751,7 @@ public: CarlaPlugin::clearBuffers(); - carla_debug("Lv2Plugin::clearBuffers() - end"); + carla_debug("CarlaPluginLV2::clearBuffers() - end"); } // ------------------------------------------------------------------- @@ -3995,7 +3995,7 @@ public: void recheckExtensions() { CARLA_SAFE_ASSERT_RETURN(fRdfDescriptor != nullptr,); - carla_debug("Lv2Plugin::recheckExtensions()"); + carla_debug("CarlaPluginLV2::recheckExtensions()"); fExt.options = nullptr; fExt.programs = nullptr; @@ -4079,7 +4079,7 @@ public: { CARLA_SAFE_ASSERT_RETURN(fUI.handle != nullptr,); CARLA_SAFE_ASSERT_RETURN(fUI.descriptor != nullptr,); - carla_debug("Lv2Plugin::updateUi()"); + carla_debug("CarlaPluginLV2::updateUi()"); // update midi program if (fExt.uiprograms != nullptr && pData->midiprog.count > 0 && pData->midiprog.current >= 0) @@ -4105,7 +4105,7 @@ public: LV2_URID getCustomURID(const char* const uri) { CARLA_SAFE_ASSERT_RETURN(uri != nullptr && uri[0] != '\0', CARLA_URI_MAP_ID_NULL); - carla_debug("Lv2Plugin::getCustomURID(\"%s\")", uri); + carla_debug("CarlaPluginLV2::getCustomURID(\"%s\")", uri); for (size_t i=0; i < fCustomURIDs.count(); ++i) { @@ -4128,7 +4128,7 @@ public: { CARLA_SAFE_ASSERT_RETURN(urid != CARLA_URI_MAP_ID_NULL, nullptr); CARLA_SAFE_ASSERT_RETURN(urid < fCustomURIDs.count(), nullptr); - carla_debug("Lv2Plugin::getCustomURIString(%i)", urid); + carla_debug("CarlaPluginLV2::getCustomURIString(%i)", urid); return fCustomURIDs.getAt(urid, nullptr); } @@ -4138,7 +4138,7 @@ public: void handleProgramChanged(const int32_t index) { CARLA_SAFE_ASSERT_RETURN(index >= -1,); - carla_debug("Lv2Plugin::handleProgramChanged(%i)", index); + carla_debug("CarlaPluginLV2::handleProgramChanged(%i)", index); if (index == -1) { @@ -4170,7 +4170,7 @@ public: LV2_Resize_Port_Status handleResizePort(const uint32_t index, const size_t size) { CARLA_SAFE_ASSERT_RETURN(size > 0, LV2_RESIZE_PORT_ERR_UNKNOWN); - carla_debug("Lv2Plugin::handleResizePort(%i, " P_SIZE ")", index, size); + carla_debug("CarlaPluginLV2::handleResizePort(%i, " P_SIZE ")", index, size); // TODO return LV2_RESIZE_PORT_ERR_NO_SPACE; @@ -4186,7 +4186,7 @@ public: CARLA_SAFE_ASSERT_RETURN(size > 0, LV2_STATE_ERR_NO_PROPERTY); CARLA_SAFE_ASSERT_RETURN(type != CARLA_URI_MAP_ID_NULL, LV2_STATE_ERR_BAD_TYPE); CARLA_SAFE_ASSERT_RETURN(flags & LV2_STATE_IS_POD, LV2_STATE_ERR_BAD_FLAGS); - carla_debug("Lv2Plugin::handleStateStore(%i:\"%s\", %p, " P_SIZE ", %i:\"%s\", %i)", key, carla_lv2_urid_unmap(this, key), value, size, type, carla_lv2_urid_unmap(this, type), flags); + carla_debug("CarlaPluginLV2::handleStateStore(%i:\"%s\", %p, " P_SIZE ", %i:\"%s\", %i)", key, carla_lv2_urid_unmap(this, key), value, size, type, carla_lv2_urid_unmap(this, type), flags); const char* const skey(carla_lv2_urid_unmap(this, key)); const char* const stype(carla_lv2_urid_unmap(this, type)); @@ -4235,7 +4235,7 @@ public: CARLA_SAFE_ASSERT_RETURN(size != nullptr, nullptr); CARLA_SAFE_ASSERT_RETURN(type != nullptr, nullptr); CARLA_SAFE_ASSERT_RETURN(flags != nullptr, nullptr); - carla_debug("Lv2Plugin::handleStateRetrieve(%i, %p, %p, %p)", key, size, type, flags); + carla_debug("CarlaPluginLV2::handleStateRetrieve(%i, %p, %p, %p)", key, size, type, flags); const char* const skey(carla_lv2_urid_unmap(this, key)); @@ -4294,7 +4294,7 @@ public: { CARLA_SAFE_ASSERT_RETURN(fExt.worker != nullptr && fExt.worker->work != nullptr, LV2_WORKER_ERR_UNKNOWN); CARLA_SAFE_ASSERT_RETURN(fEventsIn.ctrl != nullptr, LV2_WORKER_ERR_UNKNOWN); - carla_debug("Lv2Plugin::handleWorkerSchedule(%i, %p)", size, data); + carla_debug("CarlaPluginLV2::handleWorkerSchedule(%i, %p)", size, data); if (pData->engine->isOffline()) { @@ -4311,7 +4311,7 @@ public: LV2_Worker_Status handleWorkerRespond(const uint32_t size, const void* const data) { - carla_debug("Lv2Plugin::handleWorkerRespond(%i, %p)", size, data); + carla_debug("CarlaPluginLV2::handleWorkerRespond(%i, %p)", size, data); LV2_Atom atom; atom.size = size; @@ -4325,7 +4325,7 @@ public: void handleExternalUIClosed() { CARLA_SAFE_ASSERT_RETURN(fUI.type == UI::TYPE_EXTERNAL,); - carla_debug("Lv2Plugin::handleExternalUIClosed()"); + carla_debug("CarlaPluginLV2::handleExternalUIClosed()"); if (fUI.handle != nullptr && fUI.descriptor != nullptr && fUI.descriptor->cleanup != nullptr) fUI.descriptor->cleanup(fUI.handle); @@ -4339,7 +4339,7 @@ public: { CARLA_SAFE_ASSERT_RETURN(fUI.type == UI::TYPE_EMBED,); CARLA_SAFE_ASSERT_RETURN(fUI.window != nullptr,); - carla_debug("Lv2Plugin::handlePluginUIClosed()"); + carla_debug("CarlaPluginLV2::handlePluginUIClosed()"); fUI.window->hide(); @@ -4355,7 +4355,7 @@ public: { CARLA_SAFE_ASSERT_RETURN(fUI.type == UI::TYPE_EMBED,); CARLA_SAFE_ASSERT_RETURN(fUI.window != nullptr,); - carla_stdout("Lv2Plugin::handlePluginUIResized(%u, %u)", width, height); + carla_stdout("CarlaPluginLV2::handlePluginUIResized(%u, %u)", width, height); if (fUI.handle != nullptr && fExt.uiresize != nullptr) fExt.uiresize->ui_resize(fUI.handle, static_cast(width), static_cast(height)); @@ -4366,7 +4366,7 @@ public: uint32_t handleUIPortMap(const char* const symbol) const noexcept { CARLA_SAFE_ASSERT_RETURN(symbol != nullptr && symbol[0] != '\0', LV2UI_INVALID_PORT_INDEX); - carla_debug("Lv2Plugin::handleUIPortMap(\"%s\")", symbol); + carla_debug("CarlaPluginLV2::handleUIPortMap(\"%s\")", symbol); for (uint32_t i=0; i < fRdfDescriptor->PortCount; ++i) { @@ -4382,7 +4382,7 @@ public: CARLA_SAFE_ASSERT_RETURN(fUI.window != nullptr, 1); CARLA_SAFE_ASSERT_RETURN(width > 0, 1); CARLA_SAFE_ASSERT_RETURN(height > 0, 1); - carla_debug("Lv2Plugin::handleUIResize(%i, %i)", width, height); + carla_debug("CarlaPluginLV2::handleUIResize(%i, %i)", width, height); fUI.window->setSize(static_cast(width), static_cast(height), true); @@ -4393,7 +4393,7 @@ public: { CARLA_SAFE_ASSERT_RETURN(buffer != nullptr,); CARLA_SAFE_ASSERT_RETURN(bufferSize > 0,); - carla_debug("Lv2Plugin::handleUIWrite(%i, %i, %i, %p)", rindex, bufferSize, format, buffer); + carla_debug("CarlaPluginLV2::handleUIWrite(%i, %i, %i, %p)", rindex, bufferSize, format, buffer); uint32_t index = LV2UI_INVALID_PORT_INDEX; @@ -4447,7 +4447,7 @@ public: } break; default: - carla_stdout("Lv2Plugin::handleUIWrite(%i, %i, %i:\"%s\", %p) - unknown format", rindex, bufferSize, format, carla_lv2_urid_unmap(this, format), buffer); + carla_stdout("CarlaPluginLV2::handleUIWrite(%i, %i, %i:\"%s\", %p) - unknown format", rindex, bufferSize, format, carla_lv2_urid_unmap(this, format), buffer); break; } } @@ -4460,7 +4460,7 @@ public: CARLA_SAFE_ASSERT_RETURN(value != nullptr,); CARLA_SAFE_ASSERT_RETURN(size > 0,); CARLA_SAFE_ASSERT_RETURN(type != CARLA_URI_MAP_ID_NULL,); - carla_debug("Lv2Plugin::handleLilvSetPortValue(\"%s\", %p, %i, %i)", portSymbol, value, size, type); + carla_debug("CarlaPluginLV2::handleLilvSetPortValue(\"%s\", %p, %i, %i)", portSymbol, value, size, type); int32_t rindex = -1; @@ -4500,7 +4500,7 @@ public: paramValue = static_cast((*(const int64_t*)value)); break; default: - carla_stdout("Lv2Plugin::handleLilvSetPortValue(\"%s\", %p, %i, %i:\"%s\") - unknown type", portSymbol, value, size, type, carla_lv2_urid_unmap(this, type)); + carla_stdout("CarlaPluginLV2::handleLilvSetPortValue(\"%s\", %p, %i, %i:\"%s\") - unknown type", portSymbol, value, size, type, carla_lv2_urid_unmap(this, type)); return; } @@ -5201,8 +5201,8 @@ public: guiTitle += " (GUI)"; fLv2Options.windowTitle = guiTitle.dup(); - fLv2Options.opts[Lv2PluginOptions::WindowTitle].size = (uint32_t)std::strlen(fLv2Options.windowTitle); - fLv2Options.opts[Lv2PluginOptions::WindowTitle].value = fLv2Options.windowTitle; + fLv2Options.opts[CarlaPluginLV2Options::WindowTitle].size = (uint32_t)std::strlen(fLv2Options.windowTitle); + fLv2Options.opts[CarlaPluginLV2Options::WindowTitle].value = fLv2Options.windowTitle; // --------------------------------------------------------------- // initialize ui features (part 1) @@ -5297,7 +5297,7 @@ public: void handleTransferAtom(const uint32_t portIndex, const LV2_Atom* const atom) { CARLA_SAFE_ASSERT_RETURN(atom != nullptr,); - carla_debug("Lv2Plugin::handleTransferAtom(%i, %p)", portIndex, atom); + carla_debug("CarlaPluginLV2::handleTransferAtom(%i, %p)", portIndex, atom); fAtomBufferIn.put(atom, portIndex); } @@ -5306,7 +5306,7 @@ public: { CARLA_SAFE_ASSERT_RETURN(urid != CARLA_URI_MAP_ID_NULL,); CARLA_SAFE_ASSERT_RETURN(uri != nullptr && uri[0] != '\0',); - carla_stdout("Lv2Plugin::handleUridMap(%i v " P_SIZE ", \"%s\")", urid, fCustomURIDs.count()-1, uri); + carla_stdout("CarlaPluginLV2::handleUridMap(%i v " P_SIZE ", \"%s\")", urid, fCustomURIDs.count()-1, uri); if (urid < fCustomURIDs.count()) { @@ -5348,9 +5348,9 @@ private: Lv2AtomRingBuffer fAtomBufferOut; LV2_Atom_Forge fAtomForge; - Lv2PluginEventData fEventsIn; - Lv2PluginEventData fEventsOut; - Lv2PluginOptions fLv2Options; + CarlaPluginLV2EventData fEventsIn; + CarlaPluginLV2EventData fEventsOut; + CarlaPluginLV2Options fLv2Options; LinkedList fCustomURIDs; @@ -5512,7 +5512,7 @@ private: CARLA_SAFE_ASSERT_RETURN(handle != nullptr,); carla_debug("carla_lv2_program_changed(%p, %i)", handle, index); - ((Lv2Plugin*)handle)->handleProgramChanged(index); + ((CarlaPluginLV2*)handle)->handleProgramChanged(index); } // ------------------------------------------------------------------- @@ -5523,7 +5523,7 @@ private: CARLA_SAFE_ASSERT_RETURN(data != nullptr, LV2_RESIZE_PORT_ERR_UNKNOWN); carla_debug("carla_lv2_program_changed(%p, %i, " P_SIZE ")", data, index, size); - return ((Lv2Plugin*)data)->handleResizePort(index, size); + return ((CarlaPluginLV2*)data)->handleResizePort(index, size); } // ------------------------------------------------------------------- @@ -5578,7 +5578,7 @@ private: CARLA_SAFE_ASSERT_RETURN(handle != nullptr, LV2_STATE_ERR_UNKNOWN); carla_debug("carla_lv2_state_store(%p, %i, %p, " P_SIZE ", %i, %i)", handle, key, value, size, type, flags); - return ((Lv2Plugin*)handle)->handleStateStore(key, value, size, type, flags); + return ((CarlaPluginLV2*)handle)->handleStateStore(key, value, size, type, flags); } static const void* carla_lv2_state_retrieve(LV2_State_Handle handle, uint32_t key, size_t* size, uint32_t* type, uint32_t* flags) @@ -5586,7 +5586,7 @@ private: CARLA_SAFE_ASSERT_RETURN(handle != nullptr, nullptr); carla_debug("carla_lv2_state_retrieve(%p, %i, %p, %p, %p)", handle, key, size, type, flags); - return ((Lv2Plugin*)handle)->handleStateRetrieve(key, size, type, flags); + return ((CarlaPluginLV2*)handle)->handleStateRetrieve(key, size, type, flags); } // ------------------------------------------------------------------- @@ -5715,7 +5715,7 @@ private: return CARLA_URI_MAP_ID_CARLA_ATOM_WORKER; // Custom types - return ((Lv2Plugin*)handle)->getCustomURID(uri); + return ((CarlaPluginLV2*)handle)->getCustomURID(uri); } static const char* carla_lv2_urid_unmap(LV2_URID_Map_Handle handle, LV2_URID urid) @@ -5829,7 +5829,7 @@ private: return LV2_KXSTUDIO_PROPERTIES__TransientWindowId; // Custom types - return ((Lv2Plugin*)handle)->getCustomURIDString(urid); + return ((CarlaPluginLV2*)handle)->getCustomURIDString(urid); } // ------------------------------------------------------------------- @@ -5840,7 +5840,7 @@ private: CARLA_SAFE_ASSERT_RETURN(handle != nullptr, LV2_WORKER_ERR_UNKNOWN); carla_debug("carla_lv2_worker_schedule(%p, %i, %p)", handle, size, data); - return ((Lv2Plugin*)handle)->handleWorkerSchedule(size, data); + return ((CarlaPluginLV2*)handle)->handleWorkerSchedule(size, data); } static LV2_Worker_Status carla_lv2_worker_respond(LV2_Worker_Respond_Handle handle, uint32_t size, const void* data) @@ -5848,7 +5848,7 @@ private: CARLA_SAFE_ASSERT_RETURN(handle != nullptr, LV2_WORKER_ERR_UNKNOWN); carla_debug("carla_lv2_worker_respond(%p, %i, %p)", handle, size, data); - return ((Lv2Plugin*)handle)->handleWorkerRespond(size, data); + return ((CarlaPluginLV2*)handle)->handleWorkerRespond(size, data); } // ------------------------------------------------------------------- @@ -5859,7 +5859,7 @@ private: CARLA_SAFE_ASSERT_RETURN(controller != nullptr,); carla_debug("carla_lv2_external_ui_closed(%p)", controller); - ((Lv2Plugin*)controller)->handleExternalUIClosed(); + ((CarlaPluginLV2*)controller)->handleExternalUIClosed(); } // ------------------------------------------------------------------- @@ -5870,7 +5870,7 @@ private: CARLA_SAFE_ASSERT_RETURN(handle != nullptr, LV2UI_INVALID_PORT_INDEX); carla_debug("carla_lv2_ui_port_map(%p, \"%s\")", handle, symbol); - return ((Lv2Plugin*)handle)->handleUIPortMap(symbol); + return ((CarlaPluginLV2*)handle)->handleUIPortMap(symbol); } // ------------------------------------------------------------------- @@ -5881,7 +5881,7 @@ private: CARLA_SAFE_ASSERT_RETURN(handle != nullptr, 1); carla_debug("carla_lv2_ui_resize(%p, %i, %i)", handle, width, height); - return ((Lv2Plugin*)handle)->handleUIResize(width, height); + return ((CarlaPluginLV2*)handle)->handleUIResize(width, height); } // ------------------------------------------------------------------- @@ -5892,7 +5892,7 @@ private: CARLA_SAFE_ASSERT_RETURN(controller != nullptr,); carla_debug("carla_lv2_ui_write_function(%p, %i, %i, %i, %p)", controller, port_index, buffer_size, format, buffer); - ((Lv2Plugin*)controller)->handleUIWrite(port_index, buffer_size, format, buffer); + ((CarlaPluginLV2*)controller)->handleUIWrite(port_index, buffer_size, format, buffer); } // ------------------------------------------------------------------- @@ -5903,17 +5903,17 @@ private: CARLA_SAFE_ASSERT_RETURN(user_data != nullptr,); carla_debug("carla_lilv_set_port_value(\"%s\", %p, %p, %i, %i", port_symbol, user_data, value, size, type); - ((Lv2Plugin*)user_data)->handleLilvSetPortValue(port_symbol, value, size, type); + ((CarlaPluginLV2*)user_data)->handleLilvSetPortValue(port_symbol, value, size, type); } // ------------------------------------------------------------------- - CARLA_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(Lv2Plugin) + CARLA_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(CarlaPluginLV2) }; // ------------------------------------------------------------------------------------------------------------------- -#define lv2PluginPtr ((Lv2Plugin*)plugin) +#define lv2PluginPtr ((CarlaPluginLV2*)plugin) #ifndef BUILD_BRIDGE int CarlaEngineOsc::handleMsgLv2AtomTransfer(CARLA_ENGINE_OSC_HANDLE_ARGS2) @@ -5957,7 +5957,7 @@ CarlaPlugin* CarlaPlugin::newLV2(const Initializer& init) { carla_debug("CarlaPlugin::newLV2({%p, \"%s\", \"%s\", " P_INT64 "})", init.engine, init.name, init.label, init.uniqueId); - Lv2Plugin* const plugin(new Lv2Plugin(init.engine, init.id)); + CarlaPluginLV2* const plugin(new CarlaPluginLV2(init.engine, init.id)); if (! plugin->init(init.name, init.label)) { diff --git a/source/backend/plugin/LinuxSamplerPlugin.cpp b/source/backend/plugin/CarlaPluginLinuxSampler.cpp similarity index 96% rename from source/backend/plugin/LinuxSamplerPlugin.cpp rename to source/backend/plugin/CarlaPluginLinuxSampler.cpp index 1d248d1a4..86d6bbe2e 100644 --- a/source/backend/plugin/LinuxSamplerPlugin.cpp +++ b/source/backend/plugin/CarlaPluginLinuxSampler.cpp @@ -199,10 +199,10 @@ CARLA_BACKEND_START_NAMESPACE // ----------------------------------------------------------------------- -class LinuxSamplerPlugin : public CarlaPlugin +class CarlaPluginLinuxSampler : public CarlaPlugin { public: - LinuxSamplerPlugin(CarlaEngine* const engine, const uint id, const bool isGIG, const bool use16Outs) + CarlaPluginLinuxSampler(CarlaEngine* const engine, const uint id, const bool isGIG, const bool use16Outs) : CarlaPlugin(engine, id), kIsGIG(isGIG), kUses16Outs(use16Outs && isGIG), @@ -215,9 +215,9 @@ public: fInstrument(nullptr), fInstrumentIds(), sSampler(), - leakDetector_LinuxSamplerPlugin() + leakDetector_CarlaPluginLinuxSampler() { - carla_debug("LinuxSamplerPlugin::LinuxSamplerPlugin(%p, %i, %s, %s)", engine, id, bool2str(isGIG), bool2str(use16Outs)); + carla_debug("CarlaPluginLinuxSampler::CarlaPluginLinuxSampler(%p, %i, %s, %s)", engine, id, bool2str(isGIG), bool2str(use16Outs)); carla_zeroStruct(fCurProgs, MAX_MIDI_CHANNELS); carla_zeroStruct(fEngineChannels, MAX_MIDI_CHANNELS); @@ -227,9 +227,9 @@ public: carla_stderr("Tried to use SFZ with 16 stereo outs, this doesn't make much sense so single stereo mode will be used instead"); } - ~LinuxSamplerPlugin() override + ~CarlaPluginLinuxSampler() override { - carla_debug("LinuxSamplerPlugin::~LinuxSamplerPlugin()"); + carla_debug("CarlaPluginLinuxSampler::~CarlaPluginLinuxSampler()"); pData->singleMutex.lock(); pData->masterMutex.lock(); @@ -408,13 +408,13 @@ public: CARLA_SAFE_ASSERT_RETURN(type != nullptr && type[0] != '\0',); CARLA_SAFE_ASSERT_RETURN(key != nullptr && key[0] != '\0',); CARLA_SAFE_ASSERT_RETURN(value != nullptr && value[0] != '\0',); - carla_debug("LinuxSamplerPlugin::setCustomData(%s, \"%s\", \"%s\", %s)", type, key, value, bool2str(sendGui)); + carla_debug("CarlaPluginLinuxSampler::setCustomData(%s, \"%s\", \"%s\", %s)", type, key, value, bool2str(sendGui)); if (std::strcmp(type, CUSTOM_DATA_TYPE_STRING) != 0) - return carla_stderr2("LinuxSamplerPlugin::setCustomData(\"%s\", \"%s\", \"%s\", %s) - type is not string", type, key, value, bool2str(sendGui)); + return carla_stderr2("CarlaPluginLinuxSampler::setCustomData(\"%s\", \"%s\", \"%s\", %s) - type is not string", type, key, value, bool2str(sendGui)); if (std::strcmp(key, "programs") != 0) - return carla_stderr2("LinuxSamplerPlugin::setCustomData(\"%s\", \"%s\", \"%s\", %s) - type is not string", type, key, value, bool2str(sendGui)); + return carla_stderr2("CarlaPluginLinuxSampler::setCustomData(\"%s\", \"%s\", \"%s\", %s) - type is not string", type, key, value, bool2str(sendGui)); if (kMaxChannels > 1 && fInstrumentIds.size() > 1) { @@ -514,7 +514,7 @@ public: { CARLA_SAFE_ASSERT_RETURN(pData->engine != nullptr,); CARLA_SAFE_ASSERT_RETURN(fInstrument != nullptr,); - carla_debug("LinuxSamplerPlugin::reload() - start"); + carla_debug("CarlaPluginLinuxSampler::reload() - start"); const EngineProcessMode processMode(pData->engine->getProccessMode()); @@ -644,12 +644,12 @@ public: if (pData->active) activate(); - carla_debug("LinuxSamplerPlugin::reload() - end"); + carla_debug("CarlaPluginLinuxSampler::reload() - end"); } void reloadPrograms(bool doInit) override { - carla_debug("LinuxSamplerPlugin::reloadPrograms(%s)", bool2str(doInit)); + carla_debug("CarlaPluginLinuxSampler::reloadPrograms(%s)", bool2str(doInit)); // Delete old programs pData->prog.clear(); @@ -1316,7 +1316,7 @@ private: SharedResourcePointer sSampler; - CARLA_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(LinuxSamplerPlugin) + CARLA_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(CarlaPluginLinuxSampler) }; CARLA_BACKEND_END_NAMESPACE @@ -1329,7 +1329,7 @@ CARLA_BACKEND_START_NAMESPACE CarlaPlugin* CarlaPlugin::newLinuxSampler(const Initializer& init, const char* const format, const bool use16Outs) { - carla_debug("LinuxSamplerPlugin::newLinuxSampler({%p, \"%s\", \"%s\", \"%s\", " P_INT64 "}, %s, %s)", init.engine, init.filename, init.name, init.label, init.uniqueId, format, bool2str(use16Outs)); + carla_debug("CarlaPluginLinuxSampler::newLinuxSampler({%p, \"%s\", \"%s\", \"%s\", " P_INT64 "}, %s, %s)", init.engine, init.filename, init.name, init.label, init.uniqueId, format, bool2str(use16Outs)); #ifdef HAVE_LINUXSAMPLER CarlaString sformat(format); @@ -1356,7 +1356,7 @@ CarlaPlugin* CarlaPlugin::newLinuxSampler(const Initializer& init, const char* c return nullptr; } - LinuxSamplerPlugin* const plugin(new LinuxSamplerPlugin(init.engine, init.id, (sformat == "gig"), use16Outs)); + CarlaPluginLinuxSampler* const plugin(new CarlaPluginLinuxSampler(init.engine, init.id, (sformat == "gig"), use16Outs)); if (! plugin->init(init.filename, init.name, init.label)) { diff --git a/source/backend/plugin/NativePlugin.cpp b/source/backend/plugin/CarlaPluginNative.cpp similarity index 98% rename from source/backend/plugin/NativePlugin.cpp rename to source/backend/plugin/CarlaPluginNative.cpp index 81f5443db..e1699f053 100644 --- a/source/backend/plugin/NativePlugin.cpp +++ b/source/backend/plugin/CarlaPluginNative.cpp @@ -131,10 +131,10 @@ struct ScopedInitializer { // ----------------------------------------------------- -class NativePlugin : public CarlaPlugin +class CarlaPluginNative : public CarlaPlugin { public: - NativePlugin(CarlaEngine* const engine, const uint id) + CarlaPluginNative(CarlaEngine* const engine, const uint id) : CarlaPlugin(engine, id), fHandle(nullptr), fHandle2(nullptr), @@ -148,9 +148,9 @@ public: fMidiIn(), fMidiOut(), fTimeInfo(), - leakDetector_NativePlugin() + leakDetector_CarlaPluginNative() { - carla_debug("NativePlugin::NativePlugin(%p, %i)", engine, id); + carla_debug("CarlaPluginNative::CarlaPluginNative(%p, %i)", engine, id); carla_fill(fCurMidiProgs, 0, MAX_MIDI_CHANNELS); carla_zeroStruct(fMidiEvents, kPluginMaxMidiEvents*2); @@ -174,9 +174,9 @@ public: fHost.dispatcher = carla_host_dispatcher; } - ~NativePlugin() override + ~CarlaPluginNative() override { - carla_debug("NativePlugin::~NativePlugin()"); + carla_debug("CarlaPluginNative::~CarlaPluginNative()"); // close UI if (pData->hints & PLUGIN_HAS_CUSTOM_UI) @@ -587,10 +587,10 @@ public: CARLA_SAFE_ASSERT_RETURN(type != nullptr && type[0] != '\0',); CARLA_SAFE_ASSERT_RETURN(key != nullptr && key[0] != '\0',); CARLA_SAFE_ASSERT_RETURN(value != nullptr,); - carla_debug("NativePlugin::setCustomData(%s, %s, %s, %s)", type, key, value, bool2str(sendGui)); + carla_debug("CarlaPluginNative::setCustomData(%s, %s, %s, %s)", type, key, value, bool2str(sendGui)); if (std::strcmp(type, CUSTOM_DATA_TYPE_STRING) != 0 && std::strcmp(type, CUSTOM_DATA_TYPE_CHUNK) != 0) - return carla_stderr2("NativePlugin::setCustomData(\"%s\", \"%s\", \"%s\", %s) - type is invalid", type, key, value, bool2str(sendGui)); + return carla_stderr2("CarlaPluginNative::setCustomData(\"%s\", \"%s\", \"%s\", %s) - type is invalid", type, key, value, bool2str(sendGui)); if (std::strcmp(type, CUSTOM_DATA_TYPE_CHUNK) == 0) { @@ -767,7 +767,7 @@ public: CARLA_SAFE_ASSERT_RETURN(pData->engine != nullptr,); CARLA_SAFE_ASSERT_RETURN(fDescriptor != nullptr,); CARLA_SAFE_ASSERT_RETURN(fHandle != nullptr,); - carla_debug("NativePlugin::reload() - start"); + carla_debug("CarlaPluginNative::reload() - start"); const EngineProcessMode processMode(pData->engine->getProccessMode()); @@ -1143,12 +1143,12 @@ public: if (pData->active) activate(); - carla_debug("NativePlugin::reload() - end"); + carla_debug("CarlaPluginNative::reload() - end"); } void reloadPrograms(const bool doInit) override { - carla_debug("NativePlugin::reloadPrograms(%s)", bool2str(doInit)); + carla_debug("CarlaPluginNative::reloadPrograms(%s)", bool2str(doInit)); uint32_t i, oldCount = pData->midiprog.count; const int32_t current = pData->midiprog.current; @@ -1905,7 +1905,7 @@ public: void bufferSizeChanged(const uint32_t newBufferSize) override { CARLA_ASSERT_INT(newBufferSize > 0, newBufferSize); - carla_debug("NativePlugin::bufferSizeChanged(%i)", newBufferSize); + carla_debug("CarlaPluginNative::bufferSizeChanged(%i)", newBufferSize); for (uint32_t i=0; i < pData->audioIn.count; ++i) { @@ -1933,7 +1933,7 @@ public: void sampleRateChanged(const double newSampleRate) override { CARLA_ASSERT_INT(newSampleRate > 0.0, newSampleRate); - carla_debug("NativePlugin::sampleRateChanged(%g)", newSampleRate); + carla_debug("CarlaPluginNative::sampleRateChanged(%g)", newSampleRate); if (fDescriptor != nullptr && fDescriptor->dispatcher != nullptr) { @@ -1968,7 +1968,7 @@ public: void clearBuffers() noexcept override { - carla_debug("NativePlugin::clearBuffers() - start"); + carla_debug("CarlaPluginNative::clearBuffers() - start"); if (fAudioInBuffers != nullptr) { @@ -2005,7 +2005,7 @@ public: CarlaPlugin::clearBuffers(); - carla_debug("NativePlugin::clearBuffers() - end"); + carla_debug("CarlaPluginNative::clearBuffers() - end"); } // ------------------------------------------------------------------- @@ -2111,7 +2111,7 @@ protected: return false; if (! fIsProcessing) { - carla_stderr2("NativePlugin::handleWriteMidiEvent(%p) - received MIDI out event outside audio thread, ignoring", event); + carla_stderr2("CarlaPluginNative::handleWriteMidiEvent(%p) - received MIDI out event outside audio thread, ignoring", event); return false; } @@ -2156,7 +2156,7 @@ protected: intptr_t handleDispatcher(const NativeHostDispatcherOpcode opcode, const int32_t index, const intptr_t value, void* const ptr, const float opt) { - carla_debug("NativePlugin::handleDispatcher(%i, %i, " P_INTPTR ", %p, %f)", opcode, index, value, ptr, opt); + carla_debug("CarlaPluginNative::handleDispatcher(%i, %i, " P_INTPTR ", %p, %f)", opcode, index, value, ptr, opt); intptr_t ret = 0; @@ -2371,7 +2371,7 @@ private: // ------------------------------------------------------------------- - #define handlePtr ((NativePlugin*)handle) + #define handlePtr ((CarlaPluginNative*)handle) static uint32_t carla_host_get_buffer_size(NativeHostHandle handle) noexcept { @@ -2430,19 +2430,19 @@ private: #undef handlePtr - CARLA_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(NativePlugin) + CARLA_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(CarlaPluginNative) }; // ----------------------------------------------------------------------- std::size_t CarlaPlugin::getNativePluginCount() noexcept { - return NativePlugin::getPluginCount(); + return CarlaPluginNative::getPluginCount(); } const NativePluginDescriptor* CarlaPlugin::getNativePluginDescriptor(const std::size_t index) noexcept { - return NativePlugin::getPluginDescriptor(index); + return CarlaPluginNative::getPluginDescriptor(index); } // ----------------------------------------------------------------------- @@ -2451,7 +2451,7 @@ CarlaPlugin* CarlaPlugin::newNative(const Initializer& init) { carla_debug("CarlaPlugin::newNative({%p, \"%s\", \"%s\", \"%s\", " P_INT64 "})", init.engine, init.filename, init.name, init.label, init.uniqueId); - NativePlugin* const plugin(new NativePlugin(init.engine, init.id)); + CarlaPluginNative* const plugin(new CarlaPluginNative(init.engine, init.id)); if (! plugin->init(init.name, init.label)) { diff --git a/source/backend/plugin/CarlaPluginThread.cpp b/source/backend/plugin/CarlaPluginThread.cpp index e877b19fb..17e5e4459 100644 --- a/source/backend/plugin/CarlaPluginThread.cpp +++ b/source/backend/plugin/CarlaPluginThread.cpp @@ -40,8 +40,8 @@ const char* PluginThreadMode2str(const CarlaPluginThread::Mode mode) noexcept return "PLUGIN_THREAD_DSSI_GUI"; case CarlaPluginThread::PLUGIN_THREAD_LV2_GUI: return "PLUGIN_THREAD_LV2_GUI"; - case CarlaPluginThread::PLUGIN_THREAD_VST_GUI: - return "PLUGIN_THREAD_VST_GUI"; + case CarlaPluginThread::PLUGIN_THREAD_VST2_GUI: + return "PLUGIN_THREAD_VST2_GUI"; case CarlaPluginThread::PLUGIN_THREAD_BRIDGE: return "PLUGIN_THREAD_BRIDGE"; } @@ -129,7 +129,7 @@ void CarlaPluginThread::run() case PLUGIN_THREAD_DSSI_GUI: case PLUGIN_THREAD_LV2_GUI: - case PLUGIN_THREAD_VST_GUI: + case PLUGIN_THREAD_VST2_GUI: fEngine->callback(CarlaBackend::ENGINE_CALLBACK_UI_STATE_CHANGED, fPlugin->getId(), 0, 0, 0.0f, nullptr); fProcess->kill(); fProcess = nullptr; @@ -199,10 +199,10 @@ void CarlaPluginThread::run() else carla_setenv("ENGINE_OPTION_PLUGIN_PATH_LV2", ""); - if (options.pathVST != nullptr) - carla_setenv("ENGINE_OPTION_PLUGIN_PATH_VST", options.pathVST); + if (options.pathVST2 != nullptr) + carla_setenv("ENGINE_OPTION_PLUGIN_PATH_VST2", options.pathVST2); else - carla_setenv("ENGINE_OPTION_PLUGIN_PATH_VST", ""); + carla_setenv("ENGINE_OPTION_PLUGIN_PATH_VST2", ""); if (options.pathVST3 != nullptr) carla_setenv("ENGINE_OPTION_PLUGIN_PATH_VST3", options.pathVST3); @@ -269,7 +269,7 @@ void CarlaPluginThread::run() /* UI Title */ arguments.add(name + String(" (GUI)")); break; - case PLUGIN_THREAD_VST_GUI: + case PLUGIN_THREAD_VST2_GUI: /* osc-url */ arguments.add(String(fEngine->getOscServerPathUDP()) + String("/") + String(fPlugin->getId())); /* filename */ arguments.add(filename); /* ui-title */ arguments.add(name + String(" (GUI)")); @@ -305,7 +305,7 @@ void CarlaPluginThread::run() case PLUGIN_THREAD_DSSI_GUI: case PLUGIN_THREAD_LV2_GUI: - case PLUGIN_THREAD_VST_GUI: + case PLUGIN_THREAD_VST2_GUI: if (fPlugin->waitForOscGuiShow()) { while (fProcess->isRunning() && ! shouldThreadExit()) diff --git a/source/backend/plugin/CarlaPluginThread.hpp b/source/backend/plugin/CarlaPluginThread.hpp index cb3c13186..c90c698c0 100644 --- a/source/backend/plugin/CarlaPluginThread.hpp +++ b/source/backend/plugin/CarlaPluginThread.hpp @@ -38,7 +38,7 @@ public: PLUGIN_THREAD_NULL, PLUGIN_THREAD_DSSI_GUI, PLUGIN_THREAD_LV2_GUI, - PLUGIN_THREAD_VST_GUI, + PLUGIN_THREAD_VST2_GUI, PLUGIN_THREAD_BRIDGE }; diff --git a/source/backend/plugin/VstPlugin.cpp b/source/backend/plugin/CarlaPluginVST2.cpp similarity index 97% rename from source/backend/plugin/VstPlugin.cpp rename to source/backend/plugin/CarlaPluginVST2.cpp index a5c794512..d4bbaa7df 100644 --- a/source/backend/plugin/VstPlugin.cpp +++ b/source/backend/plugin/CarlaPluginVST2.cpp @@ -51,11 +51,11 @@ static const int32_t kVstMidiEventSize = static_cast(sizeof(VstMidiEven // ----------------------------------------------------- -class VstPlugin : public CarlaPlugin, - CarlaPluginUI::CloseCallback +class CarlaPluginVST2 : public CarlaPlugin, + private CarlaPluginUI::CloseCallback { public: - VstPlugin(CarlaEngine* const engine, const uint id) + CarlaPluginVST2(CarlaEngine* const engine, const uint id) : CarlaPlugin(engine, id), fUnique1(1), fEffect(nullptr), @@ -72,9 +72,9 @@ public: fEvents(), fUI(), fUnique2(2), - leakDetector_VstPlugin() + leakDetector_CarlaPluginVST2() { - carla_debug("VstPlugin::VstPlugin(%p, %i)", engine, id); + carla_debug("CarlaPluginVST2::CarlaPluginVST2(%p, %i)", engine, id); carla_zeroStruct(fMidiEvents, kPluginMaxMidiEvents*2); carla_zeroStruct(fTimeInfo); @@ -82,7 +82,7 @@ public: for (ushort i=0; i < kPluginMaxMidiEvents*2; ++i) fEvents.data[i] = (VstEvent*)&fMidiEvents[i]; - pData->osc.thread.setMode(CarlaPluginThread::PLUGIN_THREAD_VST_GUI); + pData->osc.thread.setMode(CarlaPluginThread::PLUGIN_THREAD_VST2_GUI); #ifdef CARLA_OS_WIN fProcThread.p = nullptr; @@ -96,9 +96,9 @@ public: fUnique1 = fUnique2 = rand(); } - ~VstPlugin() override + ~CarlaPluginVST2() override { - carla_debug("VstPlugin::~VstPlugin()"); + carla_debug("CarlaPluginVST2::~CarlaPluginVST2()"); // close UI if (pData->hints & PLUGIN_HAS_CUSTOM_UI) @@ -146,7 +146,7 @@ public: PluginType getType() const noexcept override { - return PLUGIN_VST; + return PLUGIN_VST2; } PluginCategory getCategory() const noexcept override @@ -204,7 +204,7 @@ public: const intptr_t ret = dispatcher(effGetChunk, 0 /* bank */, 0, dataPtr, 0.0f); CARLA_SAFE_ASSERT_RETURN(ret >= 0, 0); return static_cast(ret); - } CARLA_SAFE_EXCEPTION_RETURN("VstPlugin::getChunkData", 0); + } CARLA_SAFE_EXCEPTION_RETURN("CarlaPluginVST2::getChunkData", 0); } // ------------------------------------------------------------------- @@ -555,7 +555,7 @@ public: { CARLA_SAFE_ASSERT_RETURN(pData->engine != nullptr,); CARLA_SAFE_ASSERT_RETURN(fEffect != nullptr,); - carla_debug("VstPlugin::reload() - start"); + carla_debug("CarlaPluginVST2::reload() - start"); const EngineProcessMode processMode(pData->engine->getProccessMode()); @@ -926,12 +926,12 @@ public: if (pData->active) activate(); - carla_debug("VstPlugin::reload() - end"); + carla_debug("CarlaPluginVST2::reload() - end"); } void reloadPrograms(const bool doInit) override { - carla_debug("VstPlugin::reloadPrograms(%s)", bool2str(doInit)); + carla_debug("CarlaPluginVST2::reloadPrograms(%s)", bool2str(doInit)); const uint32_t oldCount = pData->prog.count; const int32_t current = pData->prog.current; @@ -1660,7 +1660,7 @@ public: void bufferSizeChanged(const uint32_t newBufferSize) override { CARLA_ASSERT_INT(newBufferSize > 0, newBufferSize); - carla_debug("VstPlugin::bufferSizeChanged(%i)", newBufferSize); + carla_debug("CarlaPluginVST2::bufferSizeChanged(%i)", newBufferSize); if (pData->active) deactivate(); @@ -1677,7 +1677,7 @@ public: void sampleRateChanged(const double newSampleRate) override { CARLA_ASSERT_INT(newSampleRate > 0.0, newSampleRate); - carla_debug("VstPlugin::sampleRateChanged(%g)", newSampleRate); + carla_debug("CarlaPluginVST2::sampleRateChanged(%g)", newSampleRate); if (pData->active) deactivate(); @@ -1769,7 +1769,7 @@ protected: { CARLA_SAFE_ASSERT_RETURN(fUI.type == UI::UI_EMBED || fUI.type == UI::UI_EXTERNAL,); CARLA_SAFE_ASSERT_RETURN(fUI.window != nullptr,); - carla_debug("VstPlugin::handlePluginUIClosed()"); + carla_debug("CarlaPluginVST2::handlePluginUIClosed()"); showCustomUI(false); pData->engine->callback(ENGINE_CALLBACK_UI_STATE_CHANGED, pData->id, 0, 0, 0.0f, nullptr); @@ -1779,7 +1779,7 @@ protected: { CARLA_SAFE_ASSERT_RETURN(fUI.type == UI::UI_EMBED,); CARLA_SAFE_ASSERT_RETURN(fUI.window != nullptr,); - carla_debug("VstPlugin::handlePluginUIResized(%u, %u)", width, height); + carla_debug("CarlaPluginVST2::handlePluginUIResized(%u, %u)", width, height); return; // unused (void)width; (void)height; @@ -1792,7 +1792,7 @@ protected: CARLA_SAFE_ASSERT_RETURN(fEffect != nullptr, 0); #ifdef DEBUG if (opcode != effIdle && opcode != effEditIdle && opcode != effProcessEvents) - carla_debug("VstPlugin::dispatcher(%02i:%s, %i, " P_INTPTR ", %p, %f)", opcode, vstEffectOpcode2str(opcode), index, value, ptr, opt); + carla_debug("CarlaPluginVST2::dispatcher(%02i:%s, %i, " P_INTPTR ", %p, %f)", opcode, vstEffectOpcode2str(opcode), index, value, ptr, opt); #endif try { @@ -1804,7 +1804,7 @@ protected: { #ifdef DEBUG if (opcode != audioMasterGetTime) - carla_debug("VstPlugin::handleAudioMasterCallback(%02i:%s, %i, " P_INTPTR ", %p, %f)", opcode, vstMasterOpcode2str(opcode), index, value, ptr, opt); + carla_debug("CarlaPluginVST2::handleAudioMasterCallback(%02i:%s, %i, " P_INTPTR ", %p, %f)", opcode, vstMasterOpcode2str(opcode), index, value, ptr, opt); #endif intptr_t ret = 0; @@ -1942,7 +1942,7 @@ protected: if (x_engine->getOptions().processMode == PROCESS_MODE_CONTINUOUS_RACK) { - carla_stderr2("VstPlugin::handleAudioMasterIOChanged() - plugin asked IO change, but it's not supported in rack mode"); + carla_stderr2("CarlaPluginVST2::handleAudioMasterIOChanged() - plugin asked IO change, but it's not supported in rack mode"); return 0; } @@ -2144,7 +2144,7 @@ protected: #endif default: - carla_debug("VstPlugin::handleAudioMasterCallback(%02i:%s, %i, " P_INTPTR ", %p, %f) UNDEF", opcode, vstMasterOpcode2str(opcode), index, value, ptr, opt); + carla_debug("CarlaPluginVST2::handleAudioMasterCallback(%02i:%s, %i, " P_INTPTR ", %p, %f) UNDEF", opcode, vstMasterOpcode2str(opcode), index, value, ptr, opt); break; } @@ -2228,9 +2228,9 @@ public: // --------------------------------------------------------------- // initialize plugin (part 1) - sLastVstPlugin = this; + sLastCarlaPluginVST2 = this; fEffect = vstFn(carla_vst_audioMasterCallback); - sLastVstPlugin = nullptr; + sLastCarlaPluginVST2 = nullptr; if (fEffect == nullptr) { @@ -2415,7 +2415,7 @@ private: int fUnique2; - static VstPlugin* sLastVstPlugin; + static CarlaPluginVST2* sLastCarlaPluginVST2; // ------------------------------------------------------------------- @@ -2497,21 +2497,21 @@ private: } // Check if 'resvd1' points to us, otherwise register ourselfs if possible - VstPlugin* self = nullptr; + CarlaPluginVST2* self = nullptr; if (effect != nullptr) { #ifdef VESTIGE_HEADER if (effect->ptr1 != nullptr) { - self = (VstPlugin*)effect->ptr1; + self = (CarlaPluginVST2*)effect->ptr1; if (self->fUnique1 != self->fUnique2) self = nullptr; } #else if (effect->resvd1 != 0) { - self = (VstPlugin*)effect->resvd1; + self = (CarlaPluginVST2*)effect->resvd1; if (self->fUnique1 != self->fUnique2) self = nullptr; } @@ -2528,24 +2528,24 @@ private: self = nullptr; } } - else if (sLastVstPlugin != nullptr) + else if (sLastCarlaPluginVST2 != nullptr) { #ifdef VESTIGE_HEADER - effect->ptr1 = sLastVstPlugin; + effect->ptr1 = sLastCarlaPluginVST2; #else - effect->resvd1 = (intptr_t)sLastVstPlugin; + effect->resvd1 = (intptr_t)sLastCarlaPluginVST2; #endif - self = sLastVstPlugin; + self = sLastCarlaPluginVST2; } } return (self != nullptr) ? self->handleAudioMasterCallback(opcode, index, value, ptr, opt) : 0; } - CARLA_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(VstPlugin) + CARLA_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(CarlaPluginVST2) }; -VstPlugin* VstPlugin::sLastVstPlugin = nullptr; +CarlaPluginVST2* CarlaPluginVST2::sLastCarlaPluginVST2 = nullptr; CARLA_BACKEND_END_NAMESPACE @@ -2555,14 +2555,14 @@ CARLA_BACKEND_END_NAMESPACE CARLA_BACKEND_START_NAMESPACE -CarlaPlugin* CarlaPlugin::newVST(const Initializer& init) +CarlaPlugin* CarlaPlugin::newVST2(const Initializer& init) { - carla_debug("CarlaPlugin::newVST({%p, \"%s\", \"%s\", " P_INT64 "})", init.engine, init.filename, init.name, init.uniqueId); + carla_debug("CarlaPlugin::newVST2({%p, \"%s\", \"%s\", " P_INT64 "})", init.engine, init.filename, init.name, init.uniqueId); #ifdef USE_JUCE_FOR_VST return newJuce(init, "VST"); #else - VstPlugin* const plugin(new VstPlugin(init.engine, init.id)); + CarlaPluginVST2* const plugin(new CarlaPluginVST2(init.engine, init.id)); if (! plugin->init(init.filename, init.name, init.uniqueId)) { diff --git a/source/backend/plugin/Vst3Plugin.cpp b/source/backend/plugin/CarlaPluginVST3.cpp similarity index 100% rename from source/backend/plugin/Vst3Plugin.cpp rename to source/backend/plugin/CarlaPluginVST3.cpp diff --git a/source/backend/plugin/Makefile b/source/backend/plugin/Makefile index ef7833100..8d41f43ef 100644 --- a/source/backend/plugin/Makefile +++ b/source/backend/plugin/Makefile @@ -13,17 +13,17 @@ OBJS = \ $(OBJDIR)/CarlaPlugin.cpp.o \ $(OBJDIR)/CarlaPluginInternal.cpp.o \ $(OBJDIR)/CarlaPluginThread.cpp.o \ - $(OBJDIR)/NativePlugin.cpp.o \ - $(OBJDIR)/BridgePlugin.cpp.o \ - $(OBJDIR)/LadspaPlugin.cpp.o \ - $(OBJDIR)/DssiPlugin.cpp.o \ - $(OBJDIR)/Lv2Plugin.cpp.o \ - $(OBJDIR)/VstPlugin.cpp.o \ - $(OBJDIR)/Vst3Plugin.cpp.o \ - $(OBJDIR)/AuPlugin.cpp.o \ - $(OBJDIR)/JucePlugin.cpp.o \ - $(OBJDIR)/FluidSynthPlugin.cpp.o \ - $(OBJDIR)/LinuxSamplerPlugin.cpp.o + $(OBJDIR)/CarlaPluginNative.cpp.o \ + $(OBJDIR)/CarlaPluginBridge.cpp.o \ + $(OBJDIR)/CarlaPluginLADSPA.cpp.o \ + $(OBJDIR)/CarlaPluginDSSI.cpp.o \ + $(OBJDIR)/CarlaPluginLV2.cpp.o \ + $(OBJDIR)/CarlaPluginVST2.cpp.o \ + $(OBJDIR)/CarlaPluginVST3.cpp.o \ + $(OBJDIR)/CarlaPluginAU.cpp.o \ + $(OBJDIR)/CarlaPluginJuce.cpp.o \ + $(OBJDIR)/CarlaPluginFluidSynth.cpp.o \ + $(OBJDIR)/CarlaPluginLinuxSampler.cpp.o TARGETS = \ $(MODULEDIR)/carla_plugin.a @@ -50,12 +50,12 @@ $(MODULEDIR)/carla_plugin.a: $(OBJS) # ---------------------------------------------------------------------------------------------------------------------------- -$(OBJDIR)/FluidSynthPlugin.cpp.o: FluidSynthPlugin.cpp +$(OBJDIR)/CarlaPluginFluidSynth.cpp.o: CarlaPluginFluidSynth.cpp -@mkdir -p $(OBJDIR) @echo "Compiling $<" @$(CXX) $< $(BUILD_CXX_FLAGS) $(FLUIDSYNTH_FLAGS) -MMD -c -o $@ -$(OBJDIR)/LinuxSamplerPlugin.cpp.o: LinuxSamplerPlugin.cpp +$(OBJDIR)/CarlaPluginLinuxSampler.cpp.o: CarlaPluginLinuxSampler.cpp -@mkdir -p $(OBJDIR) @echo "Compiling $<" @$(CXX) $< $(BUILD_CXX_FLAGS) $(LINUXSAMPLER_FLAGS) -MMD -c -o $@ diff --git a/source/bridges-plugin/Makefile b/source/bridges-plugin/Makefile index 49c1993e7..23a244666 100644 --- a/source/bridges-plugin/Makefile +++ b/source/bridges-plugin/Makefile @@ -133,10 +133,8 @@ win64: $(BINDIR)/carla-bridge-win64.exe # ---------------------------------------------------------------------------------------------------------------------------- # native -OBJS_NATIVE = $(OBJDIR)/CarlaBridgePlugin.cpp.o - -# carla-engine -OBJS_NATIVE += \ +OBJS_NATIVE = \ + $(OBJDIR)/CarlaBridgePlugin.cpp.o \ $(OBJDIR)/CarlaEngine.cpp.o \ $(OBJDIR)/CarlaEngineClient.cpp.o \ $(OBJDIR)/CarlaEngineData.cpp.o \ @@ -146,26 +144,20 @@ OBJS_NATIVE += \ $(OBJDIR)/CarlaEnginePorts.cpp.o \ $(OBJDIR)/CarlaEngineThread.cpp.o \ $(OBJDIR)/CarlaEngineJack.cpp.o \ - $(OBJDIR)/CarlaEngineBridge.cpp.o - -# carla-plugin -OBJS_NATIVE += \ + $(OBJDIR)/CarlaEngineBridge.cpp.o \ $(OBJDIR)/CarlaPlugin.cpp.o \ $(OBJDIR)/CarlaPluginInternal.cpp.o \ $(OBJDIR)/CarlaPluginThread.cpp.o \ - $(OBJDIR)/NativePlugin.cpp.o \ - $(OBJDIR)/LadspaPlugin.cpp.o \ - $(OBJDIR)/DssiPlugin.cpp.o \ - $(OBJDIR)/Lv2Plugin.cpp.o \ - $(OBJDIR)/VstPlugin.cpp.o \ - $(OBJDIR)/Vst3Plugin.cpp.o \ - $(OBJDIR)/AuPlugin.cpp.o \ - $(OBJDIR)/JucePlugin.cpp.o \ - $(OBJDIR)/FluidSynthPlugin.cpp.o \ - $(OBJDIR)/LinuxSamplerPlugin.cpp.o - -# carla-standalone -OBJS_NATIVE += \ + $(OBJDIR)/CarlaPluginNative.cpp.o \ + $(OBJDIR)/CarlaPluginLADSPA.cpp.o \ + $(OBJDIR)/CarlaPluginDSSI.cpp.o \ + $(OBJDIR)/CarlaPluginLV2.cpp.o \ + $(OBJDIR)/CarlaPluginVST2.cpp.o \ + $(OBJDIR)/CarlaPluginVST3.cpp.o \ + $(OBJDIR)/CarlaPluginAU.cpp.o \ + $(OBJDIR)/CarlaPluginJuce.cpp.o \ + $(OBJDIR)/CarlaPluginFluidSynth.cpp.o \ + $(OBJDIR)/CarlaPluginLinuxSampler.cpp.o \ $(OBJDIR)/CarlaStandalone.cpp.o # libs diff --git a/source/carla_backend.py b/source/carla_backend.py index 89dbb2539..1a2802f37 100644 --- a/source/carla_backend.py +++ b/source/carla_backend.py @@ -385,8 +385,8 @@ PLUGIN_DSSI = 3 # LV2 plugin. PLUGIN_LV2 = 4 -# VST plugin. -PLUGIN_VST = 5 +# VST2 plugin. +PLUGIN_VST2 = 5 # VST3 plugin. PLUGIN_VST3 = 6 @@ -1990,7 +1990,7 @@ class CarlaHostNull(CarlaHostMeta): "
  • LADSPA plugin support
  • " "
  • DSSI plugin support
  • " "
  • LV2 plugin support
  • " - "
  • VST plugin support using official VST SDK 2.4 [1]
  • " + "
  • VST2 plugin support using official VST SDK 2.4 [1]
  • " "
  • VST3 plugin support using official VST SDK 3.6 [1]
  • " "
  • AU plugin support
  • " diff --git a/source/carla_database.py b/source/carla_database.py index 3db335720..a6a37998c 100755 --- a/source/carla_database.py +++ b/source/carla_database.py @@ -318,8 +318,8 @@ def checkPluginDSSI(filename, tool, isWine=False): def checkPluginLV2(filename, tool, isWine=False): return runCarlaDiscovery(PLUGIN_LV2, "LV2", filename, tool, isWine) -def checkPluginVST(filename, tool, isWine=False): - return runCarlaDiscovery(PLUGIN_VST, "VST", filename, tool, isWine) +def checkPluginVST2(filename, tool, isWine=False): + return runCarlaDiscovery(PLUGIN_VST2, "VST2", filename, tool, isWine) def checkPluginVST3(filename, tool, isWine=False): return runCarlaDiscovery(PLUGIN_VST3, "VST3", filename, tool, isWine) @@ -560,32 +560,32 @@ class SearchPluginsThread(QThread): if self.fCheckVST: if self.fCheckNative: - self._checkVST(OS, self.fToolNative) - settingsDB.setValue("Plugins/VST_native", self.fVstPlugins) + self._checkVST2(OS, self.fToolNative) + settingsDB.setValue("Plugins/VST2_native", self.fVstPlugins) if not self.fContinueChecking: return if self.fCheckPosix32: - self._checkVST(OS, os.path.join(self.fPathBinaries, "carla-discovery-posix32")) - settingsDB.setValue("Plugins/VST_posix32", self.fVstPlugins) + self._checkVST2(OS, os.path.join(self.fPathBinaries, "carla-discovery-posix32")) + settingsDB.setValue("Plugins/VST2_posix32", self.fVstPlugins) if not self.fContinueChecking: return if self.fCheckPosix64: - self._checkVST(OS, os.path.join(self.fPathBinaries, "carla-discovery-posix64")) - settingsDB.setValue("Plugins/VST_posix64", self.fVstPlugins) + self._checkVST2(OS, os.path.join(self.fPathBinaries, "carla-discovery-posix64")) + settingsDB.setValue("Plugins/VST2_posix64", self.fVstPlugins) if not self.fContinueChecking: return if self.fCheckWin32: - self._checkVST("WINDOWS", os.path.join(self.fPathBinaries, "carla-discovery-win32.exe"), not WINDOWS) - settingsDB.setValue("Plugins/VST_win32", self.fVstPlugins) + self._checkVST2("WINDOWS", os.path.join(self.fPathBinaries, "carla-discovery-win32.exe"), not WINDOWS) + settingsDB.setValue("Plugins/VST2_win32", self.fVstPlugins) if not self.fContinueChecking: return if self.fCheckWin64: - self._checkVST("WINDOWS", os.path.join(self.fPathBinaries, "carla-discovery-win64.exe"), not WINDOWS) - settingsDB.setValue("Plugins/VST_win64", self.fVstPlugins) + self._checkVST2("WINDOWS", os.path.join(self.fPathBinaries, "carla-discovery-win64.exe"), not WINDOWS) + settingsDB.setValue("Plugins/VST2_win64", self.fVstPlugins) settingsDB.sync() @@ -722,38 +722,38 @@ class SearchPluginsThread(QThread): self.fLastCheckValue += self.fCurPercentValue - def _checkVST(self, OS, tool, isWine=False): - vstBinaries = [] + def _checkVST2(self, OS, tool, isWine=False): + vst2Binaries = [] self.fVstPlugins = [] if MACOS and not isWine: - self._pluginLook(self.fLastCheckValue, "VST bundles...") + self._pluginLook(self.fLastCheckValue, "VST2 bundles...") else: - self._pluginLook(self.fLastCheckValue, "VST plugins...") + self._pluginLook(self.fLastCheckValue, "VST2 plugins...") settings = QSettings("falkTX", "Carla2") - VST_PATH = toList(settings.value(CARLA_KEY_PATHS_VST, CARLA_DEFAULT_VST_PATH)) + VST2_PATH = toList(settings.value(CARLA_KEY_PATHS_VST2, CARLA_DEFAULT_VST2_PATH)) del settings - for iPATH in VST_PATH: + for iPATH in VST2_PATH: if MACOS and not isWine: binaries = findMacVSTBundles(iPATH, False) else: binaries = findBinaries(iPATH, OS) for binary in binaries: - if binary not in vstBinaries: - vstBinaries.append(binary) + if binary not in vst2Binaries: + vst2Binaries.append(binary) - vstBinaries.sort() + vst2Binaries.sort() if not self.fContinueChecking: return - for i in range(len(vstBinaries)): - vst = vstBinaries[i] - percent = ( float(i) / len(vstBinaries) ) * self.fCurPercentValue - self._pluginLook(self.fLastCheckValue + percent, vst) + for i in range(len(vst2Binaries)): + vst2 = vst2Binaries[i] + percent = ( float(i) / len(vst2Binaries) ) * self.fCurPercentValue + self._pluginLook(self.fLastCheckValue + percent, vst2) - plugins = checkPluginVST(vst, tool, isWine) + plugins = checkPluginVST2(vst2, tool, isWine) if plugins: self.fVstPlugins.append(plugins) self.fSomethingChanged = True @@ -993,7 +993,7 @@ class PluginRefreshW(QDialog): settings = QSettings("falkTX", "CarlaRefresh2") self.ui.ch_ladspa.setChecked(settings.value("PluginDatabase/SearchLADSPA", True, type=bool) and self.ui.ch_ladspa.isEnabled()) self.ui.ch_dssi.setChecked(settings.value("PluginDatabase/SearchDSSI", True, type=bool) and self.ui.ch_dssi.isEnabled()) - self.ui.ch_vst.setChecked(settings.value("PluginDatabase/SearchVST", True, type=bool) and self.ui.ch_vst.isEnabled()) + self.ui.ch_vst.setChecked(settings.value("PluginDatabase/SearchVST2", True, type=bool) and self.ui.ch_vst.isEnabled()) self.ui.ch_vst3.setChecked(settings.value("PluginDatabase/SearchVST3", (MACOS or WINDOWS), type=bool) and self.ui.ch_vst3.isEnabled()) self.ui.ch_gig.setChecked(settings.value("PluginDatabase/SearchGIG", False, type=bool) and self.ui.ch_gig.isEnabled()) self.ui.ch_sf2.setChecked(settings.value("PluginDatabase/SearchSF2", False, type=bool) and self.ui.ch_sf2.isEnabled()) @@ -1012,7 +1012,7 @@ class PluginRefreshW(QDialog): settings = QSettings("falkTX", "CarlaRefresh2") settings.setValue("PluginDatabase/SearchLADSPA", self.ui.ch_ladspa.isChecked()) settings.setValue("PluginDatabase/SearchDSSI", self.ui.ch_dssi.isChecked()) - settings.setValue("PluginDatabase/SearchVST", self.ui.ch_vst.isChecked()) + settings.setValue("PluginDatabase/SearchVST2", self.ui.ch_vst.isChecked()) settings.setValue("PluginDatabase/SearchVST3", self.ui.ch_vst3.isChecked()) settings.setValue("PluginDatabase/SearchGIG", self.ui.ch_gig.isChecked()) settings.setValue("PluginDatabase/SearchSF2", self.ui.ch_sf2.isChecked()) @@ -1234,7 +1234,7 @@ class PluginDatabaseW(QDialog): settings.setValue("PluginDatabase/ShowLADSPA", self.ui.ch_ladspa.isChecked()) settings.setValue("PluginDatabase/ShowDSSI", self.ui.ch_dssi.isChecked()) settings.setValue("PluginDatabase/ShowLV2", self.ui.ch_lv2.isChecked()) - settings.setValue("PluginDatabase/ShowVST", self.ui.ch_vst.isChecked()) + settings.setValue("PluginDatabase/ShowVST2", self.ui.ch_vst.isChecked()) settings.setValue("PluginDatabase/ShowVST3", self.ui.ch_vst3.isChecked()) settings.setValue("PluginDatabase/ShowAU", self.ui.ch_au.isChecked()) settings.setValue("PluginDatabase/ShowKits", self.ui.ch_kits.isChecked()) @@ -1259,7 +1259,7 @@ class PluginDatabaseW(QDialog): self.ui.ch_ladspa.setChecked(settings.value("PluginDatabase/ShowLADSPA", True, type=bool)) self.ui.ch_dssi.setChecked(settings.value("PluginDatabase/ShowDSSI", True, type=bool)) self.ui.ch_lv2.setChecked(settings.value("PluginDatabase/ShowLV2", True, type=bool)) - self.ui.ch_vst.setChecked(settings.value("PluginDatabase/ShowVST", True, type=bool)) + self.ui.ch_vst.setChecked(settings.value("PluginDatabase/ShowVST2", True, type=bool)) self.ui.ch_vst3.setChecked(settings.value("PluginDatabase/ShowVST3", (MACOS or WINDOWS), type=bool)) self.ui.ch_au.setChecked(settings.value("PluginDatabase/ShowAU", True, type=bool)) self.ui.ch_kits.setChecked(settings.value("PluginDatabase/ShowKits", True, type=bool)) @@ -1286,7 +1286,7 @@ class PluginDatabaseW(QDialog): hideLadspa = not self.ui.ch_ladspa.isChecked() hideDssi = not self.ui.ch_dssi.isChecked() hideLV2 = not self.ui.ch_lv2.isChecked() - hideVST = not self.ui.ch_vst.isChecked() + hideVST2 = not self.ui.ch_vst.isChecked() hideVST3 = not self.ui.ch_vst3.isChecked() hideAU = not self.ui.ch_au.isChecked() hideKits = not self.ui.ch_kits.isChecked() @@ -1351,7 +1351,7 @@ class PluginDatabaseW(QDialog): self.ui.tableWidget.hideRow(i) elif hideLV2 and ptype == "LV2": self.ui.tableWidget.hideRow(i) - elif hideVST and ptype == "VST": + elif hideVST2 and ptype == "VST2": self.ui.tableWidget.hideRow(i) elif hideVST3 and ptype == "VST3": self.ui.tableWidget.hideRow(i) @@ -1389,7 +1389,7 @@ class PluginDatabaseW(QDialog): if plugin['API'] != PLUGIN_QUERY_API_VERSION and ptype == self.tr("Internal"): return - if ptype in (self.tr("Internal"), "LV2", "AU"): + if ptype in (self.tr("Internal"), "LV2", "AU", "GIG", "SF2", "SFZ"): plugin['build'] = BINARY_NATIVE index = self.fLastTableIndex @@ -1590,7 +1590,7 @@ class PluginDatabaseW(QDialog): for plugins in vstPlugins: for plugin in plugins: - self._addPluginToTable(plugin, "VST") + self._addPluginToTable(plugin, "VST2") vstCount += 1 del vstPlugins diff --git a/source/carla_host.py b/source/carla_host.py index 996a5cb97..dd6fd47ca 100644 --- a/source/carla_host.py +++ b/source/carla_host.py @@ -1127,7 +1127,7 @@ class HostWindow(QMainWindow): LADSPA_PATH = toList(settings.value(CARLA_KEY_PATHS_LADSPA, CARLA_DEFAULT_LADSPA_PATH)) DSSI_PATH = toList(settings.value(CARLA_KEY_PATHS_DSSI, CARLA_DEFAULT_DSSI_PATH)) LV2_PATH = toList(settings.value(CARLA_KEY_PATHS_LV2, CARLA_DEFAULT_LV2_PATH)) - VST_PATH = toList(settings.value(CARLA_KEY_PATHS_VST, CARLA_DEFAULT_VST_PATH)) + VST2_PATH = toList(settings.value(CARLA_KEY_PATHS_VST2, CARLA_DEFAULT_VST2_PATH)) VST3_PATH = toList(settings.value(CARLA_KEY_PATHS_VST3, CARLA_DEFAULT_VST3_PATH)) AU_PATH = toList(settings.value(CARLA_KEY_PATHS_AU, CARLA_DEFAULT_AU_PATH)) GIG_PATH = toList(settings.value(CARLA_KEY_PATHS_GIG, CARLA_DEFAULT_GIG_PATH)) @@ -1137,7 +1137,7 @@ class HostWindow(QMainWindow): self.host.set_engine_option(ENGINE_OPTION_PLUGIN_PATH, PLUGIN_LADSPA, splitter.join(LADSPA_PATH)) self.host.set_engine_option(ENGINE_OPTION_PLUGIN_PATH, PLUGIN_DSSI, splitter.join(DSSI_PATH)) self.host.set_engine_option(ENGINE_OPTION_PLUGIN_PATH, PLUGIN_LV2, splitter.join(LV2_PATH)) - self.host.set_engine_option(ENGINE_OPTION_PLUGIN_PATH, PLUGIN_VST, splitter.join(VST_PATH)) + self.host.set_engine_option(ENGINE_OPTION_PLUGIN_PATH, PLUGIN_VST2, splitter.join(VST2_PATH)) self.host.set_engine_option(ENGINE_OPTION_PLUGIN_PATH, PLUGIN_VST3, splitter.join(VST3_PATH)) self.host.set_engine_option(ENGINE_OPTION_PLUGIN_PATH, PLUGIN_AU, splitter.join(AU_PATH)) self.host.set_engine_option(ENGINE_OPTION_PLUGIN_PATH, PLUGIN_GIG, splitter.join(GIG_PATH)) diff --git a/source/carla_settings.py b/source/carla_settings.py index 96ebb1bcb..e95cff418 100755 --- a/source/carla_settings.py +++ b/source/carla_settings.py @@ -193,7 +193,7 @@ class CarlaSettingsW(QDialog): PATH_INDEX_LADSPA = 0 PATH_INDEX_DSSI = 1 PATH_INDEX_LV2 = 2 - PATH_INDEX_VST = 3 + PATH_INDEX_VST2 = 3 PATH_INDEX_VST3 = 4 PATH_INDEX_AU = 5 if MACOS else -2 PATH_INDEX_GIG = 6 if MACOS else 5 @@ -368,7 +368,7 @@ class CarlaSettingsW(QDialog): ladspas = toList(settings.value(CARLA_KEY_PATHS_LADSPA, CARLA_DEFAULT_LADSPA_PATH)) dssis = toList(settings.value(CARLA_KEY_PATHS_DSSI, CARLA_DEFAULT_DSSI_PATH)) lv2s = toList(settings.value(CARLA_KEY_PATHS_LV2, CARLA_DEFAULT_LV2_PATH)) - vsts = toList(settings.value(CARLA_KEY_PATHS_VST, CARLA_DEFAULT_VST_PATH)) + vst2s = toList(settings.value(CARLA_KEY_PATHS_VST2, CARLA_DEFAULT_VST2_PATH)) vst3s = toList(settings.value(CARLA_KEY_PATHS_VST3, CARLA_DEFAULT_VST3_PATH)) aus = toList(settings.value(CARLA_KEY_PATHS_AU, CARLA_DEFAULT_AU_PATH)) gigs = toList(settings.value(CARLA_KEY_PATHS_GIG, CARLA_DEFAULT_GIG_PATH)) @@ -378,7 +378,7 @@ class CarlaSettingsW(QDialog): ladspas.sort() dssis.sort() lv2s.sort() - vsts.sort() + vst2s.sort() vst3s.sort() aus.sort() gigs.sort() @@ -397,9 +397,9 @@ class CarlaSettingsW(QDialog): if not lv2: continue self.ui.lw_lv2.addItem(lv2) - for vst in vsts: - if not vst: continue - self.ui.lw_vst.addItem(vst) + for vst2 in vst2s: + if not vst2: continue + self.ui.lw_vst.addItem(vst2) for vst3 in vst3s: if not vst3: continue @@ -491,7 +491,7 @@ class CarlaSettingsW(QDialog): ladspas = [] dssis = [] lv2s = [] - vsts = [] + vst2s = [] vst3s = [] aus = [] gigs = [] @@ -508,7 +508,7 @@ class CarlaSettingsW(QDialog): lv2s.append(self.ui.lw_lv2.item(i).text()) for i in range(self.ui.lw_vst.count()): - vsts.append(self.ui.lw_vst.item(i).text()) + vst2s.append(self.ui.lw_vst.item(i).text()) for i in range(self.ui.lw_vst3.count()): vst3s.append(self.ui.lw_vst3.item(i).text()) @@ -528,7 +528,7 @@ class CarlaSettingsW(QDialog): self.host.set_engine_option(ENGINE_OPTION_PLUGIN_PATH, PLUGIN_LADSPA, splitter.join(ladspas)) self.host.set_engine_option(ENGINE_OPTION_PLUGIN_PATH, PLUGIN_DSSI, splitter.join(dssis)) self.host.set_engine_option(ENGINE_OPTION_PLUGIN_PATH, PLUGIN_LV2, splitter.join(lv2s)) - self.host.set_engine_option(ENGINE_OPTION_PLUGIN_PATH, PLUGIN_VST, splitter.join(vsts)) + self.host.set_engine_option(ENGINE_OPTION_PLUGIN_PATH, PLUGIN_VST2, splitter.join(vst2s)) self.host.set_engine_option(ENGINE_OPTION_PLUGIN_PATH, PLUGIN_VST3, splitter.join(vst3s)) self.host.set_engine_option(ENGINE_OPTION_PLUGIN_PATH, PLUGIN_AU, splitter.join(aus)) self.host.set_engine_option(ENGINE_OPTION_PLUGIN_PATH, PLUGIN_GIG, splitter.join(gigs)) @@ -538,7 +538,7 @@ class CarlaSettingsW(QDialog): settings.setValue(CARLA_KEY_PATHS_LADSPA, ladspas) settings.setValue(CARLA_KEY_PATHS_DSSI, dssis) settings.setValue(CARLA_KEY_PATHS_LV2, lv2s) - settings.setValue(CARLA_KEY_PATHS_VST, vsts) + settings.setValue(CARLA_KEY_PATHS_VST2, vst2s) settings.setValue(CARLA_KEY_PATHS_VST3, vst3s) settings.setValue(CARLA_KEY_PATHS_AU, aus) settings.setValue(CARLA_KEY_PATHS_GIG, gigs) @@ -627,8 +627,8 @@ class CarlaSettingsW(QDialog): if not path: continue self.ui.lw_lv2.addItem(path) - elif curIndex == self.PATH_INDEX_VST: - paths = CARLA_DEFAULT_VST_PATH + elif curIndex == self.PATH_INDEX_VST2: + paths = CARLA_DEFAULT_VST2_PATH paths.sort() self.ui.lw_vst.clear() @@ -722,7 +722,7 @@ class CarlaSettingsW(QDialog): self.ui.lw_dssi.addItem(newPath) elif curIndex == self.PATH_INDEX_LV2: self.ui.lw_lv2.addItem(newPath) - elif curIndex == self.PATH_INDEX_VST: + elif curIndex == self.PATH_INDEX_VST2: self.ui.lw_vst.addItem(newPath) elif curIndex == self.PATH_INDEX_VST3: self.ui.lw_vst3.addItem(newPath) @@ -745,7 +745,7 @@ class CarlaSettingsW(QDialog): self.ui.lw_dssi.takeItem(self.ui.lw_dssi.currentRow()) elif curIndex == self.PATH_INDEX_LV2: self.ui.lw_lv2.takeItem(self.ui.lw_lv2.currentRow()) - elif curIndex == self.PATH_INDEX_VST: + elif curIndex == self.PATH_INDEX_VST2: self.ui.lw_vst.takeItem(self.ui.lw_vst.currentRow()) elif curIndex == self.PATH_INDEX_VST3: self.ui.lw_vst3.takeItem(self.ui.lw_vst3.currentRow()) @@ -768,7 +768,7 @@ class CarlaSettingsW(QDialog): currentPath = self.ui.lw_dssi.currentItem().text() elif curIndex == self.PATH_INDEX_LV2: currentPath = self.ui.lw_lv2.currentItem().text() - elif curIndex == self.PATH_INDEX_VST: + elif curIndex == self.PATH_INDEX_VST2: currentPath = self.ui.lw_vst.currentItem().text() elif curIndex == self.PATH_INDEX_VST3: currentPath = self.ui.lw_vst3.currentItem().text() @@ -794,7 +794,7 @@ class CarlaSettingsW(QDialog): self.ui.lw_dssi.currentItem().setText(newPath) elif curIndex == self.PATH_INDEX_LV2: self.ui.lw_lv2.currentItem().setText(newPath) - elif curIndex == self.PATH_INDEX_VST: + elif curIndex == self.PATH_INDEX_VST2: self.ui.lw_vst.currentItem().setText(newPath) elif curIndex == self.PATH_INDEX_VST3: self.ui.lw_vst3.currentItem().setText(newPath) @@ -817,7 +817,7 @@ class CarlaSettingsW(QDialog): row = self.ui.lw_dssi.currentRow() elif index == self.PATH_INDEX_LV2: row = self.ui.lw_lv2.currentRow() - elif index == self.PATH_INDEX_VST: + elif index == self.PATH_INDEX_VST2: row = self.ui.lw_vst.currentRow() elif index == self.PATH_INDEX_VST3: row = self.ui.lw_vst3.currentRow() diff --git a/source/carla_shared.py b/source/carla_shared.py index 457e8868c..e1f199723 100644 --- a/source/carla_shared.py +++ b/source/carla_shared.py @@ -212,7 +212,7 @@ CARLA_KEY_ENGINE_UI_BRIDGES_TIMEOUT = "Engine/UiBridgesTimeout" # int CARLA_KEY_PATHS_LADSPA = "Paths/LADSPA" CARLA_KEY_PATHS_DSSI = "Paths/DSSI" CARLA_KEY_PATHS_LV2 = "Paths/LV2" -CARLA_KEY_PATHS_VST = "Paths/VST" +CARLA_KEY_PATHS_VST2 = "Paths/VST2" CARLA_KEY_PATHS_VST3 = "Paths/VST3" CARLA_KEY_PATHS_AU = "Paths/AU" CARLA_KEY_PATHS_GIG = "Paths/GIG" @@ -276,7 +276,7 @@ else: DEFAULT_LADSPA_PATH = "" DEFAULT_DSSI_PATH = "" DEFAULT_LV2_PATH = "" -DEFAULT_VST_PATH = "" +DEFAULT_VST2_PATH = "" DEFAULT_VST3_PATH = "" DEFAULT_AU_PATH = "" DEFAULT_GIG_PATH = "" @@ -314,11 +314,11 @@ if WINDOWS: DEFAULT_LV2_PATH = APPDATA + "\\LV2" DEFAULT_LV2_PATH += ";" + COMMONPROGRAMFILES + "\\LV2" - DEFAULT_VST_PATH = PROGRAMFILES + "\\VstPlugins" - DEFAULT_VST_PATH += ";" + PROGRAMFILES + "\\Steinberg\\VstPlugins" + DEFAULT_VST2_PATH = PROGRAMFILES + "\\VstPlugins" + DEFAULT_VST2_PATH += ";" + PROGRAMFILES + "\\Steinberg\\VstPlugins" if kIs64bit: - DEFAULT_VST_PATH += ";" + COMMONPROGRAMFILES + "\\VST2" + DEFAULT_VST2_PATH += ";" + COMMONPROGRAMFILES + "\\VST2" DEFAULT_VST3_PATH = COMMONPROGRAMFILES + "\\VST3" @@ -329,8 +329,8 @@ if WINDOWS: if PROGRAMFILESx86: DEFAULT_LADSPA_PATH += ";" + PROGRAMFILESx86 + "\\LADSPA" DEFAULT_DSSI_PATH += ";" + PROGRAMFILESx86 + "\\DSSI" - DEFAULT_VST_PATH += ";" + PROGRAMFILESx86 + "\\VstPlugins" - DEFAULT_VST_PATH += ";" + PROGRAMFILESx86 + "\\Steinberg\\VstPlugins" + DEFAULT_VST2_PATH += ";" + PROGRAMFILESx86 + "\\VstPlugins" + DEFAULT_VST2_PATH += ";" + PROGRAMFILESx86 + "\\Steinberg\\VstPlugins" if COMMONPROGRAMFILESx86: DEFAULT_VST3_PATH += COMMONPROGRAMFILESx86 + "\\VST3" @@ -347,8 +347,8 @@ elif HAIKU: DEFAULT_LV2_PATH = HOME + "/.lv2" DEFAULT_LV2_PATH += ":/boot/common/add-ons/lv2" - DEFAULT_VST_PATH = HOME + "/.vst" - DEFAULT_VST_PATH += ":/boot/common/add-ons/vst" + DEFAULT_VST2_PATH = HOME + "/.vst" + DEFAULT_VST2_PATH += ":/boot/common/add-ons/vst" DEFAULT_VST3_PATH = HOME + "/.vst3" DEFAULT_VST3_PATH += ":/boot/common/add-ons/vst3" @@ -365,8 +365,8 @@ elif MACOS: DEFAULT_LV2_PATH = HOME + "/Library/Audio/Plug-Ins/LV2" DEFAULT_LV2_PATH += ":/Library/Audio/Plug-Ins/LV2" - DEFAULT_VST_PATH = HOME + "/Library/Audio/Plug-Ins/VST" - DEFAULT_VST_PATH += ":/Library/Audio/Plug-Ins/VST" + DEFAULT_VST2_PATH = HOME + "/Library/Audio/Plug-Ins/VST" + DEFAULT_VST2_PATH += ":/Library/Audio/Plug-Ins/VST" DEFAULT_VST3_PATH = HOME + "/Library/Audio/Plug-Ins/VST3" DEFAULT_VST3_PATH += ":/Library/Audio/Plug-Ins/VST3" @@ -389,9 +389,9 @@ else: DEFAULT_LV2_PATH += ":/usr/lib/lv2" DEFAULT_LV2_PATH += ":/usr/local/lib/lv2" - DEFAULT_VST_PATH = HOME + "/.vst" - DEFAULT_VST_PATH += ":/usr/lib/vst" - DEFAULT_VST_PATH += ":/usr/local/lib/vst" + DEFAULT_VST2_PATH = HOME + "/.vst" + DEFAULT_VST2_PATH += ":/usr/lib/vst" + DEFAULT_VST2_PATH += ":/usr/local/lib/vst" DEFAULT_VST3_PATH = HOME + "/.vst3" DEFAULT_VST3_PATH += ":/usr/lib/vst3" @@ -413,11 +413,11 @@ if not WINDOWS: winePrefix = HOME + "/.wine" if os.path.exists(winePrefix): - DEFAULT_VST_PATH += ":" + winePrefix + "/drive_c/Program Files/VstPlugins" + DEFAULT_VST2_PATH += ":" + winePrefix + "/drive_c/Program Files/VstPlugins" DEFAULT_VST3_PATH += ":" + winePrefix + "/drive_c/Program Files/Common Files/VST3" if kIs64bit and os.path.exists(winePrefix + "/drive_c/Program Files (x86)"): - DEFAULT_VST_PATH += ":" + winePrefix + "/drive_c/Program Files (x86)/VstPlugins" + DEFAULT_VST2_PATH += ":" + winePrefix + "/drive_c/Program Files (x86)/VstPlugins" DEFAULT_VST3_PATH += ":" + winePrefix + "/drive_c/Program Files (x86)/Common Files/VST3" del winePrefix @@ -447,7 +447,7 @@ if readEnvVars: CARLA_DEFAULT_LADSPA_PATH = os.getenv("LADSPA_PATH", DEFAULT_LADSPA_PATH).split(splitter) CARLA_DEFAULT_DSSI_PATH = os.getenv("DSSI_PATH", DEFAULT_DSSI_PATH).split(splitter) CARLA_DEFAULT_LV2_PATH = os.getenv("LV2_PATH", DEFAULT_LV2_PATH).split(splitter) - CARLA_DEFAULT_VST_PATH = os.getenv("VST_PATH", DEFAULT_VST_PATH).split(splitter) + CARLA_DEFAULT_VST2_PATH = os.getenv("VST_PATH", DEFAULT_VST2_PATH).split(splitter) CARLA_DEFAULT_VST3_PATH = os.getenv("VST3_PATH", DEFAULT_VST3_PATH).split(splitter) CARLA_DEFAULT_AU_PATH = os.getenv("AU_PATH", DEFAULT_AU_PATH).split(splitter) CARLA_DEFAULT_GIG_PATH = os.getenv("GIG_PATH", DEFAULT_GIG_PATH).split(splitter) @@ -458,7 +458,7 @@ else: CARLA_DEFAULT_LADSPA_PATH = DEFAULT_LADSPA_PATH.split(splitter) CARLA_DEFAULT_DSSI_PATH = DEFAULT_DSSI_PATH.split(splitter) CARLA_DEFAULT_LV2_PATH = DEFAULT_LV2_PATH.split(splitter) - CARLA_DEFAULT_VST_PATH = DEFAULT_VST_PATH.split(splitter) + CARLA_DEFAULT_VST2_PATH = DEFAULT_VST2_PATH.split(splitter) CARLA_DEFAULT_VST3_PATH = DEFAULT_VST3_PATH.split(splitter) CARLA_DEFAULT_AU_PATH = DEFAULT_AU_PATH.split(splitter) CARLA_DEFAULT_GIG_PATH = DEFAULT_GIG_PATH.split(splitter) @@ -471,7 +471,7 @@ else: del DEFAULT_LADSPA_PATH del DEFAULT_DSSI_PATH del DEFAULT_LV2_PATH -del DEFAULT_VST_PATH +del DEFAULT_VST2_PATH del DEFAULT_VST3_PATH del DEFAULT_AU_PATH del DEFAULT_GIG_PATH diff --git a/source/carla_utils.py b/source/carla_utils.py index 26a41a178..91627336b 100644 --- a/source/carla_utils.py +++ b/source/carla_utils.py @@ -39,8 +39,8 @@ def getPluginTypeAsString(ptype): return "DSSI" if ptype == PLUGIN_LV2: return "LV2" - if ptype == PLUGIN_VST: - return "VST" + if ptype == PLUGIN_VST2: + return "VST2" if ptype == PLUGIN_VST3: return "VST3" if ptype == PLUGIN_AU: @@ -63,7 +63,7 @@ def getPluginTypeFromString(stype): if stype == "none": return PLUGIN_NONE - if stype == "internal": + if stype in ("internal", "native"): return PLUGIN_INTERNAL if stype == "ladspa": return PLUGIN_LADSPA @@ -71,11 +71,11 @@ def getPluginTypeFromString(stype): return PLUGIN_DSSI if stype == "lv2": return PLUGIN_LV2 - if stype == "vst": - return PLUGIN_VST + if stype in ("vst2", "vst"): + return PLUGIN_VST2 if stype == "vst3": return PLUGIN_VST3 - if stype == "au": + if stype in ("au", "audiounit"): return PLUGIN_AU if stype == "gig": return PLUGIN_GIG diff --git a/source/carla_widgets.py b/source/carla_widgets.py index 232b44b7b..3f148f5a3 100755 --- a/source/carla_widgets.py +++ b/source/carla_widgets.py @@ -746,7 +746,7 @@ class PluginEdit(QDialog): self.ui.ch_send_program_changes.setEnabled(canSendPrograms) self.ui.ch_send_program_changes.setChecked(self.fPluginInfo['optionsEnabled'] & PLUGIN_OPTION_SEND_PROGRAM_CHANGES) - self.ui.sw_programs.setCurrentIndex(0 if self.fPluginInfo['type'] in (PLUGIN_VST, PLUGIN_GIG, PLUGIN_SFZ) else 1) + self.ui.sw_programs.setCurrentIndex(0 if self.fPluginInfo['type'] in (PLUGIN_VST2, PLUGIN_GIG, PLUGIN_SFZ) else 1) # Show/hide keyboard showKeyboard = (self.fPluginInfo['category'] == PLUGIN_CATEGORY_SYNTH or midiCountInfo['ins'] > 0 < midiCountInfo['outs']) diff --git a/source/discovery/Makefile b/source/discovery/Makefile index d4152dc8b..b04b568e4 100644 --- a/source/discovery/Makefile +++ b/source/discovery/Makefile @@ -115,16 +115,6 @@ endif # -------------------------------------------------------------- -DEPS = $(CARLA_BACKEND_UTILS_HPP) -DEPS += $(CARLA_LIB_UTILS_HPP) -DEPS += $(CARLA_MATH_UTILS_HPP) -DEPS += $(CARLA_MIDI_H) -# juce_audio_processors.h -DEPS += $(CARLA_LADSPA_UTILS_HPP) -DEPS += $(CARLA_DSSI_UTILS_CPP) -DEPS += $(CARLA_LV2_UTILS_HPP) -DEPS += $(CARLA_VST_UTILS_HPP) - OBJS = carla-discovery.cpp # -------------------------------------------------------------- diff --git a/source/discovery/carla-discovery.cpp b/source/discovery/carla-discovery.cpp index 43108ce2d..94c8dc4f8 100644 --- a/source/discovery/carla-discovery.cpp +++ b/source/discovery/carla-discovery.cpp @@ -1397,7 +1397,7 @@ static void do_juce_check(const char* const filename_, const char* const stype, juce::ScopedPointer pluginFormat; - /* */ if (std::strcmp(stype, "VST") == 0) + /* */ if (std::strcmp(stype, "VST2") == 0) { #if JUCE_PLUGINHOST_VST pluginFormat = new VSTPluginFormat(); @@ -1645,7 +1645,7 @@ int main(int argc, char* argv[]) case PLUGIN_LADSPA: case PLUGIN_DSSI: #ifndef CARLA_OS_MAC - case PLUGIN_VST: + case PLUGIN_VST2: openLib = true; #endif default: @@ -1698,9 +1698,9 @@ int main(int argc, char* argv[]) case PLUGIN_LV2: do_lv2_check(filename, doInit); break; - case PLUGIN_VST: + case PLUGIN_VST2: #ifdef CARLA_OS_MAC - do_juce_check(filename, "VST", doInit); + do_juce_check(filename, "VST2", doInit); #else do_vst_check(handle, doInit); #endif diff --git a/source/frontend/carla_shared.hpp b/source/frontend/carla_shared.hpp index 8b875e6ec..6672cbd59 100644 --- a/source/frontend/carla_shared.hpp +++ b/source/frontend/carla_shared.hpp @@ -88,7 +88,7 @@ extern QStringList MIDI_CC_LIST; #define CARLA_KEY_PATHS_LADSPA "Paths/LADSPA" #define CARLA_KEY_PATHS_DSSI "Paths/DSSI" #define CARLA_KEY_PATHS_LV2 "Paths/LV2" -#define CARLA_KEY_PATHS_VST "Paths/VST" +#define CARLA_KEY_PATHS_VST2 "Paths/VST2" #define CARLA_KEY_PATHS_VST3 "Paths/VST3" #define CARLA_KEY_PATHS_AU "Paths/AU" #define CARLA_KEY_PATHS_GIG "Paths/GIG" diff --git a/source/modules/native-plugins/Makefile b/source/modules/native-plugins/Makefile index bae67f20e..0da7db131 100644 --- a/source/modules/native-plugins/Makefile +++ b/source/modules/native-plugins/Makefile @@ -157,20 +157,25 @@ $(OBJDIR)/%.c.o: %.c # ---------------------------------------------------------------------------------------------------------------------------- -$(OBJDIR)/zynaddsubfx-src.cpp.o: zynaddsubfx-src.cpp $(ZYN_UI_FILES_H) +$(OBJDIR)/zynaddsubfx-fx.cpp.o: zynaddsubfx-fx.cpp $(ZYN_UI_FILES_H) -@mkdir -p $(OBJDIR) @echo "Compiling $<" - @$(CXX) $< $(ZYN_CXX_FLAGS) -MMD -w -c -o $@ + @$(CXX) $< $(ZYN_CXX_FLAGS) -MMD -c -o $@ -$(OBJDIR)/zynaddsubfx-ui.cpp.o: zynaddsubfx-ui.cpp $(ZYN_UI_FILES_H) $(ZYN_UI_FILES_CPP) +$(OBJDIR)/zynaddsubfx-synth.cpp.o: zynaddsubfx-synth.cpp $(ZYN_UI_FILES_H) + -@mkdir -p $(OBJDIR) + @echo "Compiling $<" + @$(CXX) $< $(ZYN_CXX_FLAGS) -MMD -c -o $@ + +$(OBJDIR)/zynaddsubfx-src.cpp.o: zynaddsubfx-src.cpp $(ZYN_UI_FILES_H) -@mkdir -p $(OBJDIR) @echo "Compiling $<" @$(CXX) $< $(ZYN_CXX_FLAGS) -MMD -w -c -o $@ -$(OBJDIR)/zynaddsubfx-%.cpp.o: zynaddsubfx-%.cpp $(ZYN_UI_FILES_H) +$(OBJDIR)/zynaddsubfx-ui.cpp.o: zynaddsubfx-ui.cpp $(ZYN_UI_FILES_H) $(ZYN_UI_FILES_CPP) -@mkdir -p $(OBJDIR) @echo "Compiling $<" - @$(CXX) $< $(ZYN_CXX_FLAGS) -MMD -c -o $@ + @$(CXX) $< $(ZYN_CXX_FLAGS) -MMD -w -c -o $@ $(OBJDIR)/%.cpp.o: %.cpp -@mkdir -p $(OBJDIR) diff --git a/source/utils/CarlaBackendUtils.hpp b/source/utils/CarlaBackendUtils.hpp index 78e75acbc..b31659a67 100644 --- a/source/utils/CarlaBackendUtils.hpp +++ b/source/utils/CarlaBackendUtils.hpp @@ -95,8 +95,8 @@ const char* PluginType2Str(const PluginType type) noexcept return "PLUGIN_DSSI"; case PLUGIN_LV2: return "PLUGIN_LV2"; - case PLUGIN_VST: - return "PLUGIN_VST"; + case PLUGIN_VST2: + return "PLUGIN_VST2"; case PLUGIN_VST3: return "PLUGIN_VST3"; case PLUGIN_AU: @@ -433,8 +433,8 @@ const char* getPluginTypeAsString(const PluginType type) noexcept return "DSSI"; case PLUGIN_LV2: return "LV2"; - case PLUGIN_VST: - return "VST"; + case PLUGIN_VST2: + return "VST2"; case PLUGIN_VST3: return "VST3"; case PLUGIN_AU: @@ -466,7 +466,7 @@ PluginType getPluginTypeFromString(const char* const ctype) noexcept if (stype == "none") return PLUGIN_NONE; - if (stype == "internal") + if (stype == "internal" || stype == "native") return PLUGIN_INTERNAL; if (stype == "ladspa") return PLUGIN_LADSPA; @@ -474,13 +474,11 @@ PluginType getPluginTypeFromString(const char* const ctype) noexcept return PLUGIN_DSSI; if (stype == "lv2") return PLUGIN_LV2; - if (stype == "vst") - return PLUGIN_VST; + if (stype == "vst2" || stype == "vst") + return PLUGIN_VST2; if (stype == "vst3") return PLUGIN_VST3; - if (stype == "au") - return PLUGIN_AU; - if (stype == "audiounit") + if (stype == "au" || stype == "audiounit") return PLUGIN_AU; if (stype == "gig") return PLUGIN_GIG; diff --git a/source/utils/CarlaStateUtils.cpp b/source/utils/CarlaStateUtils.cpp index 0bdb24648..6f05253db 100644 --- a/source/utils/CarlaStateUtils.cpp +++ b/source/utils/CarlaStateUtils.cpp @@ -501,7 +501,7 @@ String StateSave::toString() const case PLUGIN_LV2: infoXml << " " << xmlSafeString(label, true) << "\n"; break; - case PLUGIN_VST: + case PLUGIN_VST2: infoXml << " " << xmlSafeString(binary, true) << "\n"; infoXml << " " << uniqueId << "\n"; break;