| @@ -547,7 +547,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_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; | gIsLoadingProject = true; | ||||
| ScopedValueSetter<bool>(gIsLoadingProject, false); | ScopedValueSetter<bool>(gIsLoadingProject, false); | ||||
| @@ -57,9 +57,10 @@ const unsigned short kPluginMaxMidiEvents = 512; | |||||
| // ----------------------------------------------------------------------- | // ----------------------------------------------------------------------- | ||||
| // Extra plugin hints, hidden from backend | // 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; | |||||
| // ----------------------------------------------------------------------- | // ----------------------------------------------------------------------- | ||||
| @@ -926,7 +926,9 @@ public: | |||||
| pData->extraHints = 0x0; | pData->extraHints = 0x0; | ||||
| pData->extraHints |= PLUGIN_EXTRA_HINT_HAS_MIDI_IN; | 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; | pData->extraHints |= PLUGIN_EXTRA_HINT_CAN_RUN_RACK; | ||||
| bufferSizeChanged(pData->engine->getBufferSize()); | bufferSizeChanged(pData->engine->getBufferSize()); | ||||
| @@ -611,7 +611,9 @@ public: | |||||
| pData->extraHints = 0x0; | pData->extraHints = 0x0; | ||||
| pData->extraHints |= PLUGIN_EXTRA_HINT_HAS_MIDI_IN; | 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; | pData->extraHints |= PLUGIN_EXTRA_HINT_CAN_RUN_RACK; | ||||
| bufferSizeChanged(pData->engine->getBufferSize()); | bufferSizeChanged(pData->engine->getBufferSize()); | ||||
| @@ -1077,6 +1077,9 @@ public: | |||||
| if (aIns <= 2 && aOuts <= 2 && (aIns == aOuts || aIns == 0 || aOuts == 0) && mIns <= 1 && mOuts <= 1) | if (aIns <= 2 && aOuts <= 2 && (aIns == aOuts || aIns == 0 || aOuts == 0) && mIns <= 1 && mOuts <= 1) | ||||
| pData->extraHints |= PLUGIN_EXTRA_HINT_CAN_RUN_RACK; | 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()); | bufferSizeChanged(pData->engine->getBufferSize()); | ||||
| reloadPrograms(true); | reloadPrograms(true); | ||||
| @@ -789,9 +789,9 @@ public: | |||||
| static const NativePluginDescriptor zynaddsubfxDesc = { | static const NativePluginDescriptor zynaddsubfxDesc = { | ||||
| /* category */ PLUGIN_CATEGORY_SYNTH, | /* category */ PLUGIN_CATEGORY_SYNTH, | ||||
| #ifdef WANT_ZYNADDSUBFX_UI | #ifdef WANT_ZYNADDSUBFX_UI | ||||
| /* hints */ static_cast<NativePluginHints>(PLUGIN_IS_SYNTH|PLUGIN_HAS_UI|PLUGIN_USES_STATE), | |||||
| /* hints */ static_cast<NativePluginHints>(PLUGIN_IS_SYNTH|PLUGIN_HAS_UI|PLUGIN_USES_MULTI_PROGS|PLUGIN_USES_STATE), | |||||
| #else | #else | ||||
| /* hints */ static_cast<NativePluginHints>(PLUGIN_IS_SYNTH|PLUGIN_USES_STATE), | |||||
| /* hints */ static_cast<NativePluginHints>(PLUGIN_IS_SYNTH|PLUGIN_USES_MULTI_PROGS|PLUGIN_USES_STATE), | |||||
| #endif | #endif | ||||
| /* supports */ static_cast<NativePluginSupports>(PLUGIN_SUPPORTS_CONTROL_CHANGES|PLUGIN_SUPPORTS_NOTE_AFTERTOUCH|PLUGIN_SUPPORTS_PITCHBEND|PLUGIN_SUPPORTS_ALL_SOUND_OFF), | /* supports */ static_cast<NativePluginSupports>(PLUGIN_SUPPORTS_CONTROL_CHANGES|PLUGIN_SUPPORTS_NOTE_AFTERTOUCH|PLUGIN_SUPPORTS_PITCHBEND|PLUGIN_SUPPORTS_ALL_SOUND_OFF), | ||||
| /* audioIns */ 0, | /* audioIns */ 0, | ||||
| @@ -1,6 +1,6 @@ | |||||
| /* | /* | ||||
| * Carla Native Plugins | * Carla Native Plugins | ||||
| * Copyright (C) 2013 Filipe Coelho <falktx@falktx.com> | |||||
| * Copyright (C) 2013-2014 Filipe Coelho <falktx@falktx.com> | |||||
| * | * | ||||
| * This program is free software; you can redistribute it and/or | * This program is free software; you can redistribute it and/or | ||||
| * modify it under the terms of the GNU General Public License as | * modify it under the terms of the GNU General Public License as | ||||