| @@ -842,7 +842,7 @@ public: | |||||
| static CarlaPlugin* newLV2(const Initializer& init); | static CarlaPlugin* newLV2(const Initializer& init); | ||||
| static CarlaPlugin* newVST(const Initializer& init); | static CarlaPlugin* newVST(const Initializer& init); | ||||
| static CarlaPlugin* newAU(const Initializer& init); | static CarlaPlugin* newAU(const Initializer& init); | ||||
| static CarlaPlugin* newCSOUND(const Initializer& init); | |||||
| static CarlaPlugin* newCsound(const Initializer& init); | |||||
| static CarlaPlugin* newGIG(const Initializer& init, const bool use16Outs); | static CarlaPlugin* newGIG(const Initializer& init, const bool use16Outs); | ||||
| static CarlaPlugin* newSF2(const Initializer& init, const bool use16Outs); | static CarlaPlugin* newSF2(const Initializer& init, const bool use16Outs); | ||||
| static CarlaPlugin* newSFZ(const Initializer& init, const bool use16Outs); | static CarlaPlugin* newSFZ(const Initializer& init, const bool use16Outs); | ||||
| @@ -1261,23 +1261,23 @@ bool CarlaEngine::addPlugin(const BinaryType btype, const PluginType ptype, cons | |||||
| break; | break; | ||||
| case PLUGIN_AU: | case PLUGIN_AU: | ||||
| //plugin = CarlaPlugin::newAU(init); | |||||
| plugin = CarlaPlugin::newAU(init); | |||||
| break; | break; | ||||
| case PLUGIN_CSOUND: | |||||
| //plugin = CarlaPlugin::newCSOUND(init); | |||||
| case PLUGIN_FILE_CSD: | |||||
| plugin = CarlaPlugin::newCsound(init); | |||||
| break; | break; | ||||
| case PLUGIN_GIG: | |||||
| plugin = CarlaPlugin::newGIG(init, (extra != nullptr)); | |||||
| case PLUGIN_FILE_GIG: | |||||
| plugin = CarlaPlugin::newGIG(init, (extra != nullptr && std::strcmp((const char*)extra, "true"))); | |||||
| break; | break; | ||||
| case PLUGIN_SF2: | |||||
| plugin = CarlaPlugin::newSF2(init, (extra != nullptr)); | |||||
| case PLUGIN_FILE_SF2: | |||||
| plugin = CarlaPlugin::newSF2(init, (extra != nullptr && std::strcmp((const char*)extra, "true"))); | |||||
| break; | break; | ||||
| case PLUGIN_SFZ: | |||||
| plugin = CarlaPlugin::newSFZ(init, (extra != nullptr)); | |||||
| case PLUGIN_FILE_SFZ: | |||||
| plugin = CarlaPlugin::newSFZ(init, (extra != nullptr && std::strcmp((const char*)extra, "true"))); | |||||
| break; | break; | ||||
| } | } | ||||
| } | } | ||||
| @@ -1614,22 +1614,22 @@ bool CarlaEngine::loadFile(const char* const filename) | |||||
| // ------------------------------------------------------------------- | // ------------------------------------------------------------------- | ||||
| if (extension == "carxp" || extension == "carxs") | |||||
| if (extension == "carxp" || extension == "carxs") | |||||
| return loadProject(filename); | return loadProject(filename); | ||||
| // ------------------------------------------------------------------- | // ------------------------------------------------------------------- | ||||
| if (extension == "csd") | if (extension == "csd") | ||||
| return addPlugin(PLUGIN_CSOUND, filename, baseName, baseName); | |||||
| return addPlugin(PLUGIN_FILE_CSD, filename, baseName, baseName); | |||||
| if (extension == "gig") | if (extension == "gig") | ||||
| return addPlugin(PLUGIN_GIG, filename, baseName, baseName); | |||||
| return addPlugin(PLUGIN_FILE_GIG, filename, baseName, baseName); | |||||
| if (extension == "sf2") | if (extension == "sf2") | ||||
| return addPlugin(PLUGIN_SF2, filename, baseName, baseName); | |||||
| return addPlugin(PLUGIN_FILE_SF2, filename, baseName, baseName); | |||||
| if (extension == "sfz") | if (extension == "sfz") | ||||
| return addPlugin(PLUGIN_SFZ, filename, baseName, baseName); | |||||
| return addPlugin(PLUGIN_FILE_SFZ, filename, baseName, baseName); | |||||
| // ------------------------------------------------------------------- | // ------------------------------------------------------------------- | ||||
| @@ -1754,8 +1754,8 @@ bool CarlaEngine::loadProject(const char* const filename) | |||||
| if (CarlaString(saveState.label).endsWith(kUse16OutsSuffix)) | if (CarlaString(saveState.label).endsWith(kUse16OutsSuffix)) | ||||
| { | { | ||||
| if (std::strcmp(saveState.type, "GIG") == 0 || std::strcmp(saveState.type, "SF2") == 0 || std::strcmp(saveState.type, "SFZ") == 0) | |||||
| extraStuff = (void*)0x1; // non-null | |||||
| if (std::strcmp(saveState.type, "GIG") == 0 || std::strcmp(saveState.type, "SF2") == 0) | |||||
| extraStuff = "true"; | |||||
| } | } | ||||
| // TODO - proper find&load plugins | // TODO - proper find&load plugins | ||||
| @@ -741,8 +741,8 @@ protected: | |||||
| if (CarlaString(saveState.label).endsWith(kUse16OutsSuffix)) | if (CarlaString(saveState.label).endsWith(kUse16OutsSuffix)) | ||||
| { | { | ||||
| if (std::strcmp(saveState.type, "GIG") == 0 || std::strcmp(saveState.type, "SF2") == 0 || std::strcmp(saveState.type, "SFZ") == 0) | |||||
| extraStuff = (void*)0x1; // non-null | |||||
| if (std::strcmp(saveState.type, "GIG") == 0 || std::strcmp(saveState.type, "SF2") == 0) | |||||
| extraStuff = "true"; | |||||
| } | } | ||||
| // TODO - proper find&load plugins | // TODO - proper find&load plugins | ||||
| @@ -601,7 +601,7 @@ const SaveState& CarlaPlugin::getSaveState() | |||||
| void CarlaPlugin::loadSaveState(const SaveState& saveState) | void CarlaPlugin::loadSaveState(const SaveState& saveState) | ||||
| { | { | ||||
| char strBuf[STR_MAX+1]; | char strBuf[STR_MAX+1]; | ||||
| const bool usesMultiProgs(getType() == PLUGIN_SF2 || (getType() == PLUGIN_INTERNAL && getCategory() == PLUGIN_CATEGORY_SYNTH)); | |||||
| const bool usesMultiProgs(getType() == PLUGIN_FILE_GIG || getType() == PLUGIN_FILE_SF2 || (getType() == PLUGIN_INTERNAL && getCategory() == PLUGIN_CATEGORY_SYNTH)); | |||||
| gIsLoadingProject = true; | gIsLoadingProject = true; | ||||
| ScopedValueSetter<bool>(gIsLoadingProject, false); | ScopedValueSetter<bool>(gIsLoadingProject, false); | ||||
| @@ -1294,7 +1294,7 @@ void CarlaPlugin::setProgram(const int32_t index, const bool sendGui, const bool | |||||
| uiProgramChange(index); | uiProgramChange(index); | ||||
| #endif | #endif | ||||
| if (getType() == PLUGIN_GIG || getType() == PLUGIN_SF2 || getType() == PLUGIN_SFZ) | |||||
| if (getType() == PLUGIN_FILE_CSD || getType() == PLUGIN_FILE_GIG || getType() == PLUGIN_FILE_SF2 || getType() == PLUGIN_FILE_SFZ) | |||||
| return; | return; | ||||
| for (uint32_t i=0; i < pData->param.count; ++i) | for (uint32_t i=0; i < pData->param.count; ++i) | ||||
| @@ -1350,7 +1350,7 @@ void CarlaPlugin::setMidiProgram(const int32_t index, const bool sendGui, const | |||||
| uiMidiProgramChange(index); | uiMidiProgramChange(index); | ||||
| #endif | #endif | ||||
| if (getType() == PLUGIN_GIG || getType() == PLUGIN_SF2 || getType() == PLUGIN_SFZ) | |||||
| if (getType() == PLUGIN_FILE_CSD || getType() == PLUGIN_FILE_GIG || getType() == PLUGIN_FILE_SF2 || getType() == PLUGIN_FILE_SFZ) | |||||
| return; | return; | ||||
| for (uint32_t i=0; i < pData->param.count; ++i) | for (uint32_t i=0; i < pData->param.count; ++i) | ||||
| @@ -81,9 +81,9 @@ CARLA_BACKEND_END_NAMESPACE | |||||
| CARLA_BACKEND_START_NAMESPACE | CARLA_BACKEND_START_NAMESPACE | ||||
| CarlaPlugin* CarlaPlugin::newCSOUND(const Initializer& init) | |||||
| CarlaPlugin* CarlaPlugin::newCsound(const Initializer& init) | |||||
| { | { | ||||
| carla_debug("CarlaPlugin::newCSOUND(%p, \"%s\", \"%s\", \"%s\")", init.engine, init.filename, init.name, init.label); | |||||
| carla_debug("CarlaPlugin::newCsound(%p, \"%s\", \"%s\", \"%s\")", init.engine, init.filename, init.name, init.label); | |||||
| #ifdef WANT_CSOUND | #ifdef WANT_CSOUND | ||||
| CsoundPlugin* const plugin(new CsoundPlugin(init.engine, init.id)); | CsoundPlugin* const plugin(new CsoundPlugin(init.engine, init.id)); | ||||
| @@ -128,7 +128,7 @@ public: | |||||
| PluginType getType() const noexcept override | PluginType getType() const noexcept override | ||||
| { | { | ||||
| return PLUGIN_SF2; | |||||
| return PLUGIN_FILE_SF2; | |||||
| } | } | ||||
| PluginCategory getCategory() const override | PluginCategory getCategory() const override | ||||
| @@ -17,6 +17,7 @@ OBJS = \ | |||||
| DssiPlugin.cpp.o \ | DssiPlugin.cpp.o \ | ||||
| Lv2Plugin.cpp.o \ | Lv2Plugin.cpp.o \ | ||||
| VstPlugin.cpp.o \ | VstPlugin.cpp.o \ | ||||
| AuPlugin.cpp.o \ | |||||
| CsoundPlugin.cpp.o \ | CsoundPlugin.cpp.o \ | ||||
| FluidSynthPlugin.cpp.o \ | FluidSynthPlugin.cpp.o \ | ||||
| LinuxSamplerPlugin.cpp.o \ | LinuxSamplerPlugin.cpp.o \ | ||||
| @@ -546,13 +546,13 @@ int main(int argc, char* argv[]) | |||||
| const void* extraStuff = nullptr; | const void* extraStuff = nullptr; | ||||
| if (itype == CarlaBackend::PLUGIN_GIG || itype == CarlaBackend::PLUGIN_SF2 || itype == CarlaBackend::PLUGIN_SFZ) | |||||
| if (itype == CarlaBackend::PLUGIN_FILE_GIG || itype == CarlaBackend::PLUGIN_FILE_SF2) | |||||
| { | { | ||||
| if (label == nullptr) | if (label == nullptr) | ||||
| label = clientName; | label = clientName; | ||||
| if (std::strstr(label, " (16 outs)") == 0) | if (std::strstr(label, " (16 outs)") == 0) | ||||
| extraStuff = (const void*)label; // dummy non-null pointer | |||||
| extraStuff = "true"; | |||||
| } | } | ||||
| // --------------------------------------------------------------------- | // --------------------------------------------------------------------- | ||||
| @@ -384,6 +384,7 @@ OBJS_NATIVE += \ | |||||
| ../backend/plugin/VstPlugin__native.o \ | ../backend/plugin/VstPlugin__native.o \ | ||||
| ../backend/plugin/AuPlugin__native.o \ | ../backend/plugin/AuPlugin__native.o \ | ||||
| ../backend/plugin/JucePlugin__native.o \ | ../backend/plugin/JucePlugin__native.o \ | ||||
| ../backend/plugin/CsoundPlugin__native.o \ | |||||
| ../backend/plugin/FluidSynthPlugin__native.o \ | ../backend/plugin/FluidSynthPlugin__native.o \ | ||||
| ../backend/plugin/LinuxSamplerPlugin__native.o | ../backend/plugin/LinuxSamplerPlugin__native.o | ||||
| @@ -508,13 +508,9 @@ class HostWindow(QMainWindow): | |||||
| if rdfItem.UniqueID == uniqueId: | if rdfItem.UniqueID == uniqueId: | ||||
| return pointer(rdfItem) | return pointer(rdfItem) | ||||
| elif ptype in (PLUGIN_GIG, PLUGIN_SF2, PLUGIN_SFZ): | |||||
| elif ptype in (PLUGIN_GIG, PLUGIN_SF2): | |||||
| if plugin['name'].lower().endswith(" (16 outputs)"): | if plugin['name'].lower().endswith(" (16 outputs)"): | ||||
| # return a dummy non-null pointer | |||||
| INTPOINTER = POINTER(c_int) | |||||
| int1 = c_int(0x1) | |||||
| addr = addressof(int1) | |||||
| return cast(addr, INTPOINTER) | |||||
| return c_char_p("true") | |||||
| return None | return None | ||||
| @@ -1908,16 +1908,16 @@ int main(int argc, char* argv[]) | |||||
| do_au_check(handle, doInit); | do_au_check(handle, doInit); | ||||
| #endif | #endif | ||||
| break; | break; | ||||
| case PLUGIN_CSOUND: | |||||
| case PLUGIN_FILE_CSD: | |||||
| do_csound_check(filename, doInit); | do_csound_check(filename, doInit); | ||||
| break; | break; | ||||
| case PLUGIN_GIG: | |||||
| case PLUGIN_FILE_GIG: | |||||
| do_linuxsampler_check(filename, "gig", doInit); | do_linuxsampler_check(filename, "gig", doInit); | ||||
| break; | break; | ||||
| case PLUGIN_SF2: | |||||
| case PLUGIN_FILE_SF2: | |||||
| do_fluidsynth_check(filename, doInit); | do_fluidsynth_check(filename, doInit); | ||||
| break; | break; | ||||
| case PLUGIN_SFZ: | |||||
| case PLUGIN_FILE_SFZ: | |||||
| do_linuxsampler_check(filename, "sfz", doInit); | do_linuxsampler_check(filename, "sfz", doInit); | ||||
| break; | break; | ||||
| default: | default: | ||||
| @@ -490,10 +490,10 @@ void fillXmlStringFromSaveState(QString& content, const SaveState& saveState) | |||||
| info += QString(" <Binary>%1</Binary>\n").arg(xmlSafeString(saveState.binary, true)); | info += QString(" <Binary>%1</Binary>\n").arg(xmlSafeString(saveState.binary, true)); | ||||
| info += QString(" <UniqueID>%1</UniqueID>\n").arg(saveState.uniqueID); | info += QString(" <UniqueID>%1</UniqueID>\n").arg(saveState.uniqueID); | ||||
| break; | break; | ||||
| case PLUGIN_CSOUND: | |||||
| case PLUGIN_GIG: | |||||
| case PLUGIN_SF2: | |||||
| case PLUGIN_SFZ: | |||||
| case PLUGIN_FILE_CSD: | |||||
| case PLUGIN_FILE_GIG: | |||||
| case PLUGIN_FILE_SF2: | |||||
| case PLUGIN_FILE_SFZ: | |||||
| info += QString(" <Filename>%1</Filename>\n").arg(xmlSafeString(saveState.binary, true)); | info += QString(" <Filename>%1</Filename>\n").arg(xmlSafeString(saveState.binary, true)); | ||||
| info += QString(" <Label>%1</Label>\n").arg(xmlSafeString(saveState.label, true)); | info += QString(" <Label>%1</Label>\n").arg(xmlSafeString(saveState.label, true)); | ||||
| break; | break; | ||||