diff --git a/source/backend/engine/CarlaEngine.cpp b/source/backend/engine/CarlaEngine.cpp index e6cf1d19e..18abff6a3 100644 --- a/source/backend/engine/CarlaEngine.cpp +++ b/source/backend/engine/CarlaEngine.cpp @@ -1897,9 +1897,10 @@ bool CarlaEngine::loadProjectInternal(juce::XmlDocument& xmlDoc) if ((plugin->getHints() & PLUGIN_IS_BRIDGE) != 0 && ! isPreset) plugin->setCustomData(CUSTOM_DATA_TYPE_STRING, "__CarlaPingOnOff__", "false", false); #endif - plugin->loadStateSave(stateSave); } + else + carla_stderr2("Failed to get new plugin, state will not be restored correctly\n"); } else carla_stderr2("Failed to load a plugin, error was:\n%s", getLastError()); diff --git a/source/backend/engine/CarlaEngineBridge.cpp b/source/backend/engine/CarlaEngineBridge.cpp index 63ddf52f1..54bb67d86 100644 --- a/source/backend/engine/CarlaEngineBridge.cpp +++ b/source/backend/engine/CarlaEngineBridge.cpp @@ -1,6 +1,6 @@ /* * Carla Plugin Host - * Copyright (C) 2011-2014 Filipe Coelho + * Copyright (C) 2011-2015 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 diff --git a/source/backend/engine/CarlaEngineNative.cpp b/source/backend/engine/CarlaEngineNative.cpp index df745c1d1..339d0a82f 100644 --- a/source/backend/engine/CarlaEngineNative.cpp +++ b/source/backend/engine/CarlaEngineNative.cpp @@ -429,7 +429,10 @@ protected: CARLA_SAFE_ASSERT_RETURN(readNextLineAsInt(index), true); if (CarlaPlugin* const plugin = fEngine->getPlugin(pluginId)) + { plugin->setProgram(index, true, true, false); + _updateParamValues(plugin, pluginId); + } } else if (std::strcmp(msg, "set_midi_program") == 0) { @@ -440,7 +443,10 @@ protected: CARLA_SAFE_ASSERT_RETURN(readNextLineAsInt(index), true); if (CarlaPlugin* const plugin = fEngine->getPlugin(pluginId)) + { plugin->setMidiProgram(index, true, true, false); + _updateParamValues(plugin, pluginId); + } } else if (std::strcmp(msg, "set_custom_data") == 0) { @@ -550,6 +556,12 @@ protected: private: CarlaEngine* const fEngine; + void _updateParamValues(CarlaPlugin* const plugin, const uint32_t pluginId) const noexcept + { + for (uint32_t i=0, count=plugin->getParameterCount(); icallback(ENGINE_CALLBACK_PARAMETER_VALUE_CHANGED, pluginId, i, 0, plugin->getParameterValue(i), nullptr); + } + CARLA_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(CarlaEngineNativeUI) }; diff --git a/source/backend/plugin/CarlaPluginBridge.cpp b/source/backend/plugin/CarlaPluginBridge.cpp index 119253615..cf6025354 100644 --- a/source/backend/plugin/CarlaPluginBridge.cpp +++ b/source/backend/plugin/CarlaPluginBridge.cpp @@ -1,6 +1,6 @@ /* * Carla Plugin Bridge - * Copyright (C) 2011-2014 Filipe Coelho + * Copyright (C) 2011-2015 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 diff --git a/source/carla_host.py b/source/carla_host.py index 103ffbf7e..0846b7139 100644 --- a/source/carla_host.py +++ b/source/carla_host.py @@ -542,7 +542,7 @@ class HostWindow(QMainWindow): @pyqtSlot() def slot_fileOpen(self): - fileFilter = self.tr("Carla Project File (*.carxp)") + fileFilter = self.tr("Carla Project File (*.carxp);;Carla Preset File (*.carxs)") filename = QFileDialog.getOpenFileName(self, self.tr("Open Carla Project File"), self.fSavedSettings[CARLA_KEY_MAIN_PROJECT_FOLDER], filter=fileFilter) if config_UseQt5: diff --git a/source/carla_skin.py b/source/carla_skin.py index 8c0acc559..ced77fb32 100755 --- a/source/carla_skin.py +++ b/source/carla_skin.py @@ -595,7 +595,9 @@ class AbstractPluginSlot(QFrame, PluginEditParentMeta): paramWidget.setContextMenuPolicy(Qt.CustomContextMenu) paramWidget.customContextMenuRequested.connect(self.slot_knobCustomMenu) paramWidget.realValueChanged.connect(self.slot_parameterValueChanged) + paramWidget.blockSignals(True) paramWidget.setValue(self.host.get_internal_parameter_value(self.fPluginId, paramIndex)) + paramWidget.blockSignals(False) # ------------------------------------------------------------- diff --git a/source/jackbridge/JackBridge2.cpp b/source/jackbridge/JackBridge2.cpp index 336c67efb..54865d1f5 100644 --- a/source/jackbridge/JackBridge2.cpp +++ b/source/jackbridge/JackBridge2.cpp @@ -1,6 +1,6 @@ /* - * JackBridge (Part 2, Semaphore functions) - * Copyright (C) 2013-2014 Filipe Coelho + * JackBridge (Part 2, Semaphore + Shared memory functions) + * Copyright (C) 2013-2015 Filipe Coelho * * Permission to use, copy, modify, and/or distribute this software for any purpose with * or without fee is hereby granted, provided that the above copyright notice and this diff --git a/source/jackbridge/JackBridgeExport.cpp b/source/jackbridge/JackBridgeExport.cpp index f8a78607a..d0cd33bce 100644 --- a/source/jackbridge/JackBridgeExport.cpp +++ b/source/jackbridge/JackBridgeExport.cpp @@ -1,6 +1,6 @@ /* * JackBridge (Part 3, Export) - * Copyright (C) 2013-2014 Filipe Coelho + * Copyright (C) 2013-2015 Filipe Coelho * * Permission to use, copy, modify, and/or distribute this software for any purpose with * or without fee is hereby granted, provided that the above copyright notice and this diff --git a/source/jackbridge/JackBridgeExport.hpp b/source/jackbridge/JackBridgeExport.hpp index 68b7b7047..58cd1ed34 100644 --- a/source/jackbridge/JackBridgeExport.hpp +++ b/source/jackbridge/JackBridgeExport.hpp @@ -1,6 +1,6 @@ /* * JackBridge (Part 3, Export) - * Copyright (C) 2013-2014 Filipe Coelho + * Copyright (C) 2013-2015 Filipe Coelho * * Permission to use, copy, modify, and/or distribute this software for any purpose with * or without fee is hereby granted, provided that the above copyright notice and this diff --git a/source/plugin/carla-lv2.cpp b/source/plugin/carla-lv2.cpp index 1a6856310..bf2cf9ec7 100644 --- a/source/plugin/carla-lv2.cpp +++ b/source/plugin/carla-lv2.cpp @@ -677,7 +677,7 @@ public: if (char* const state = fDescriptor->get_state(fHandle)) { - store(handle, fUridMap->map(fUridMap->handle, "http://kxstudio.sf.net/ns/carla/chunk"), state, std::strlen(state), fURIs.atomString, LV2_STATE_IS_POD|LV2_STATE_IS_PORTABLE); + store(handle, fUridMap->map(fUridMap->handle, "http://kxstudio.sf.net/ns/carla/chunk"), state, std::strlen(state)+1, fURIs.atomString, LV2_STATE_IS_POD|LV2_STATE_IS_PORTABLE); std::free(state); return LV2_STATE_SUCCESS; }