diff --git a/source/backend/plugin/CarlaPlugin.cpp b/source/backend/plugin/CarlaPlugin.cpp index b85cc6612..4c08805c2 100644 --- a/source/backend/plugin/CarlaPlugin.cpp +++ b/source/backend/plugin/CarlaPlugin.cpp @@ -547,7 +547,7 @@ const SaveState& CarlaPlugin::getSaveState() void CarlaPlugin::loadSaveState(const SaveState& saveState) { char strBuf[STR_MAX+1]; - const bool usesMultiProgs(getType() == PLUGIN_FILE_GIG || getType() == PLUGIN_FILE_SF2 || (getType() == PLUGIN_INTERNAL && getCategory() == PLUGIN_CATEGORY_SYNTH)); + const bool usesMultiProgs(pData->extraHints & PLUGIN_EXTRA_HINT_USES_MULTI_PROGS); gIsLoadingProject = true; ScopedValueSetter(gIsLoadingProject, false); diff --git a/source/backend/plugin/CarlaPluginInternal.hpp b/source/backend/plugin/CarlaPluginInternal.hpp index 042aac4af..dab4f642d 100644 --- a/source/backend/plugin/CarlaPluginInternal.hpp +++ b/source/backend/plugin/CarlaPluginInternal.hpp @@ -57,9 +57,10 @@ const unsigned short kPluginMaxMidiEvents = 512; // ----------------------------------------------------------------------- // Extra plugin hints, hidden from backend -const unsigned int PLUGIN_EXTRA_HINT_HAS_MIDI_IN = 0x01; -const unsigned int PLUGIN_EXTRA_HINT_HAS_MIDI_OUT = 0x02; -const unsigned int PLUGIN_EXTRA_HINT_CAN_RUN_RACK = 0x04; +const unsigned int PLUGIN_EXTRA_HINT_HAS_MIDI_IN = 0x01; +const unsigned int PLUGIN_EXTRA_HINT_HAS_MIDI_OUT = 0x02; +const unsigned int PLUGIN_EXTRA_HINT_CAN_RUN_RACK = 0x04; +const unsigned int PLUGIN_EXTRA_HINT_USES_MULTI_PROGS = 0x08; // ----------------------------------------------------------------------- diff --git a/source/backend/plugin/FluidSynthPlugin.cpp b/source/backend/plugin/FluidSynthPlugin.cpp index 6d113c175..c82fb919e 100644 --- a/source/backend/plugin/FluidSynthPlugin.cpp +++ b/source/backend/plugin/FluidSynthPlugin.cpp @@ -926,7 +926,9 @@ public: pData->extraHints = 0x0; pData->extraHints |= PLUGIN_EXTRA_HINT_HAS_MIDI_IN; - if (! fUses16Outs) + if (fUses16Outs) + pData->extraHints |= PLUGIN_EXTRA_HINT_USES_MULTI_PROGS; + else pData->extraHints |= PLUGIN_EXTRA_HINT_CAN_RUN_RACK; bufferSizeChanged(pData->engine->getBufferSize()); diff --git a/source/backend/plugin/LinuxSamplerPlugin.cpp b/source/backend/plugin/LinuxSamplerPlugin.cpp index d0e21f1f1..1473d95a8 100644 --- a/source/backend/plugin/LinuxSamplerPlugin.cpp +++ b/source/backend/plugin/LinuxSamplerPlugin.cpp @@ -611,7 +611,9 @@ public: pData->extraHints = 0x0; pData->extraHints |= PLUGIN_EXTRA_HINT_HAS_MIDI_IN; - if (! fUses16Outs) + if (fUses16Outs) + pData->extraHints |= PLUGIN_EXTRA_HINT_USES_MULTI_PROGS; + else pData->extraHints |= PLUGIN_EXTRA_HINT_CAN_RUN_RACK; bufferSizeChanged(pData->engine->getBufferSize()); diff --git a/source/backend/plugin/NativePlugin.cpp b/source/backend/plugin/NativePlugin.cpp index 6cb651182..8dad7d3f8 100644 --- a/source/backend/plugin/NativePlugin.cpp +++ b/source/backend/plugin/NativePlugin.cpp @@ -1077,6 +1077,9 @@ public: if (aIns <= 2 && aOuts <= 2 && (aIns == aOuts || aIns == 0 || aOuts == 0) && mIns <= 1 && mOuts <= 1) pData->extraHints |= PLUGIN_EXTRA_HINT_CAN_RUN_RACK; + if (fDescriptor->hints & ::PLUGIN_USES_MULTI_PROGS) + pData->extraHints |= PLUGIN_EXTRA_HINT_USES_MULTI_PROGS; + bufferSizeChanged(pData->engine->getBufferSize()); reloadPrograms(true); diff --git a/source/modules/native-plugins/zynaddsubfx-synth.cpp b/source/modules/native-plugins/zynaddsubfx-synth.cpp index 7c6f973b0..f4b40ad3b 100644 --- a/source/modules/native-plugins/zynaddsubfx-synth.cpp +++ b/source/modules/native-plugins/zynaddsubfx-synth.cpp @@ -789,9 +789,9 @@ public: static const NativePluginDescriptor zynaddsubfxDesc = { /* category */ PLUGIN_CATEGORY_SYNTH, #ifdef WANT_ZYNADDSUBFX_UI - /* hints */ static_cast(PLUGIN_IS_SYNTH|PLUGIN_HAS_UI|PLUGIN_USES_STATE), + /* hints */ static_cast(PLUGIN_IS_SYNTH|PLUGIN_HAS_UI|PLUGIN_USES_MULTI_PROGS|PLUGIN_USES_STATE), #else - /* hints */ static_cast(PLUGIN_IS_SYNTH|PLUGIN_USES_STATE), + /* hints */ static_cast(PLUGIN_IS_SYNTH|PLUGIN_USES_MULTI_PROGS|PLUGIN_USES_STATE), #endif /* supports */ static_cast(PLUGIN_SUPPORTS_CONTROL_CHANGES|PLUGIN_SUPPORTS_NOTE_AFTERTOUCH|PLUGIN_SUPPORTS_PITCHBEND|PLUGIN_SUPPORTS_ALL_SOUND_OFF), /* audioIns */ 0, diff --git a/source/plugin/carla-native-base.cpp b/source/plugin/carla-native-base.cpp index 860d8b1d6..e0709992a 100644 --- a/source/plugin/carla-native-base.cpp +++ b/source/plugin/carla-native-base.cpp @@ -1,6 +1,6 @@ /* * Carla Native Plugins - * Copyright (C) 2013 Filipe Coelho + * Copyright (C) 2013-2014 Filipe Coelho * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as