Browse Source

Fix several minor issues with carla-plugin, closes #280

tags/1.9.7
falkTX 10 years ago
parent
commit
76fe6e806a
10 changed files with 24 additions and 9 deletions
  1. +2
    -1
      source/backend/engine/CarlaEngine.cpp
  2. +1
    -1
      source/backend/engine/CarlaEngineBridge.cpp
  3. +12
    -0
      source/backend/engine/CarlaEngineNative.cpp
  4. +1
    -1
      source/backend/plugin/CarlaPluginBridge.cpp
  5. +1
    -1
      source/carla_host.py
  6. +2
    -0
      source/carla_skin.py
  7. +2
    -2
      source/jackbridge/JackBridge2.cpp
  8. +1
    -1
      source/jackbridge/JackBridgeExport.cpp
  9. +1
    -1
      source/jackbridge/JackBridgeExport.hpp
  10. +1
    -1
      source/plugin/carla-lv2.cpp

+ 2
- 1
source/backend/engine/CarlaEngine.cpp View File

@@ -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
- 1
source/backend/engine/CarlaEngineBridge.cpp View File

@@ -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


+ 12
- 0
source/backend/engine/CarlaEngineNative.cpp View File

@@ -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
- 1
source/backend/plugin/CarlaPluginBridge.cpp View File

@@ -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


+ 1
- 1
source/carla_host.py View File

@@ -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:


+ 2
- 0
source/carla_skin.py View File

@@ -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)


# ------------------------------------------------------------- # -------------------------------------------------------------




+ 2
- 2
source/jackbridge/JackBridge2.cpp View File

@@ -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
- 1
source/jackbridge/JackBridgeExport.cpp View File

@@ -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
- 1
source/jackbridge/JackBridgeExport.hpp View File

@@ -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
- 1
source/plugin/carla-lv2.cpp View File

@@ -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;
} }


Loading…
Cancel
Save