| @@ -1897,9 +1897,10 @@ bool CarlaEngine::loadProjectInternal(juce::XmlDocument& xmlDoc) | |||||
| if ((plugin->getHints() & PLUGIN_IS_BRIDGE) != 0 && ! isPreset) | if ((plugin->getHints() & PLUGIN_IS_BRIDGE) != 0 && ! isPreset) | ||||
| plugin->setCustomData(CUSTOM_DATA_TYPE_STRING, "__CarlaPingOnOff__", "false", false); | plugin->setCustomData(CUSTOM_DATA_TYPE_STRING, "__CarlaPingOnOff__", "false", false); | ||||
| #endif | #endif | ||||
| plugin->loadStateSave(stateSave); | plugin->loadStateSave(stateSave); | ||||
| } | } | ||||
| else | |||||
| carla_stderr2("Failed to get new plugin, state will not be restored correctly\n"); | |||||
| } | } | ||||
| else | else | ||||
| carla_stderr2("Failed to load a plugin, error was:\n%s", getLastError()); | carla_stderr2("Failed to load a plugin, error was:\n%s", getLastError()); | ||||
| @@ -1,6 +1,6 @@ | |||||
| /* | /* | ||||
| * Carla Plugin Host | * Carla Plugin Host | ||||
| * Copyright (C) 2011-2014 Filipe Coelho <falktx@falktx.com> | |||||
| * Copyright (C) 2011-2015 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 | ||||
| @@ -429,7 +429,10 @@ protected: | |||||
| CARLA_SAFE_ASSERT_RETURN(readNextLineAsInt(index), true); | CARLA_SAFE_ASSERT_RETURN(readNextLineAsInt(index), true); | ||||
| if (CarlaPlugin* const plugin = fEngine->getPlugin(pluginId)) | if (CarlaPlugin* const plugin = fEngine->getPlugin(pluginId)) | ||||
| { | |||||
| plugin->setProgram(index, true, true, false); | plugin->setProgram(index, true, true, false); | ||||
| _updateParamValues(plugin, pluginId); | |||||
| } | |||||
| } | } | ||||
| else if (std::strcmp(msg, "set_midi_program") == 0) | else if (std::strcmp(msg, "set_midi_program") == 0) | ||||
| { | { | ||||
| @@ -440,7 +443,10 @@ protected: | |||||
| CARLA_SAFE_ASSERT_RETURN(readNextLineAsInt(index), true); | CARLA_SAFE_ASSERT_RETURN(readNextLineAsInt(index), true); | ||||
| if (CarlaPlugin* const plugin = fEngine->getPlugin(pluginId)) | if (CarlaPlugin* const plugin = fEngine->getPlugin(pluginId)) | ||||
| { | |||||
| plugin->setMidiProgram(index, true, true, false); | plugin->setMidiProgram(index, true, true, false); | ||||
| _updateParamValues(plugin, pluginId); | |||||
| } | |||||
| } | } | ||||
| else if (std::strcmp(msg, "set_custom_data") == 0) | else if (std::strcmp(msg, "set_custom_data") == 0) | ||||
| { | { | ||||
| @@ -550,6 +556,12 @@ protected: | |||||
| private: | private: | ||||
| CarlaEngine* const fEngine; | CarlaEngine* const fEngine; | ||||
| void _updateParamValues(CarlaPlugin* const plugin, const uint32_t pluginId) const noexcept | |||||
| { | |||||
| for (uint32_t i=0, count=plugin->getParameterCount(); i<count; ++i) | |||||
| fEngine->callback(ENGINE_CALLBACK_PARAMETER_VALUE_CHANGED, pluginId, i, 0, plugin->getParameterValue(i), nullptr); | |||||
| } | |||||
| CARLA_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(CarlaEngineNativeUI) | CARLA_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(CarlaEngineNativeUI) | ||||
| }; | }; | ||||
| @@ -1,6 +1,6 @@ | |||||
| /* | /* | ||||
| * Carla Plugin Bridge | * Carla Plugin Bridge | ||||
| * Copyright (C) 2011-2014 Filipe Coelho <falktx@falktx.com> | |||||
| * Copyright (C) 2011-2015 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 | ||||
| @@ -542,7 +542,7 @@ class HostWindow(QMainWindow): | |||||
| @pyqtSlot() | @pyqtSlot() | ||||
| def slot_fileOpen(self): | 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) | filename = QFileDialog.getOpenFileName(self, self.tr("Open Carla Project File"), self.fSavedSettings[CARLA_KEY_MAIN_PROJECT_FOLDER], filter=fileFilter) | ||||
| if config_UseQt5: | if config_UseQt5: | ||||
| @@ -595,7 +595,9 @@ class AbstractPluginSlot(QFrame, PluginEditParentMeta): | |||||
| paramWidget.setContextMenuPolicy(Qt.CustomContextMenu) | paramWidget.setContextMenuPolicy(Qt.CustomContextMenu) | ||||
| paramWidget.customContextMenuRequested.connect(self.slot_knobCustomMenu) | paramWidget.customContextMenuRequested.connect(self.slot_knobCustomMenu) | ||||
| paramWidget.realValueChanged.connect(self.slot_parameterValueChanged) | paramWidget.realValueChanged.connect(self.slot_parameterValueChanged) | ||||
| paramWidget.blockSignals(True) | |||||
| paramWidget.setValue(self.host.get_internal_parameter_value(self.fPluginId, paramIndex)) | paramWidget.setValue(self.host.get_internal_parameter_value(self.fPluginId, paramIndex)) | ||||
| paramWidget.blockSignals(False) | |||||
| # ------------------------------------------------------------- | # ------------------------------------------------------------- | ||||
| @@ -1,6 +1,6 @@ | |||||
| /* | /* | ||||
| * JackBridge (Part 2, Semaphore functions) | |||||
| * Copyright (C) 2013-2014 Filipe Coelho <falktx@falktx.com> | |||||
| * JackBridge (Part 2, Semaphore + Shared memory functions) | |||||
| * Copyright (C) 2013-2015 Filipe Coelho <falktx@falktx.com> | |||||
| * | * | ||||
| * Permission to use, copy, modify, and/or distribute this software for any purpose with | * 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 | * or without fee is hereby granted, provided that the above copyright notice and this | ||||
| @@ -1,6 +1,6 @@ | |||||
| /* | /* | ||||
| * JackBridge (Part 3, Export) | * JackBridge (Part 3, Export) | ||||
| * Copyright (C) 2013-2014 Filipe Coelho <falktx@falktx.com> | |||||
| * Copyright (C) 2013-2015 Filipe Coelho <falktx@falktx.com> | |||||
| * | * | ||||
| * Permission to use, copy, modify, and/or distribute this software for any purpose with | * 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 | * or without fee is hereby granted, provided that the above copyright notice and this | ||||
| @@ -1,6 +1,6 @@ | |||||
| /* | /* | ||||
| * JackBridge (Part 3, Export) | * JackBridge (Part 3, Export) | ||||
| * Copyright (C) 2013-2014 Filipe Coelho <falktx@falktx.com> | |||||
| * Copyright (C) 2013-2015 Filipe Coelho <falktx@falktx.com> | |||||
| * | * | ||||
| * Permission to use, copy, modify, and/or distribute this software for any purpose with | * 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 | * or without fee is hereby granted, provided that the above copyright notice and this | ||||
| @@ -677,7 +677,7 @@ public: | |||||
| if (char* const state = fDescriptor->get_state(fHandle)) | 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); | std::free(state); | ||||
| return LV2_STATE_SUCCESS; | return LV2_STATE_SUCCESS; | ||||
| } | } | ||||