Browse Source

Don't be so restrictive on carla-plugin active messages

tags/v1.9.11
falkTX 7 years ago
parent
commit
f671e3db60
2 changed files with 6 additions and 4 deletions
  1. +4
    -4
      source/backend/plugin/CarlaPlugin.cpp
  2. +2
    -0
      source/bridges-plugin/CarlaBridgeSingleLV2.cpp

+ 4
- 4
source/backend/plugin/CarlaPlugin.cpp View File

@@ -887,9 +887,7 @@ void CarlaPlugin::loadStateSave(const CarlaStateSave& stateSave)
setBalanceRight(stateSave.balanceRight, true, true);
setPanning(stateSave.panning, true, true);
setCtrlChannel(stateSave.ctrlChannel, true, true);

if (! pData->enginePlugin)
setActive(stateSave.active, true, true);
setActive(stateSave.active, true, true);

if (! pData->engine->isLoadingProject())
pData->engine->callback(ENGINE_CALLBACK_UPDATE, pData->id, 0, 0, 0.0f, nullptr);
@@ -1298,8 +1296,10 @@ void CarlaPlugin::setEnabled(const bool yesNo) noexcept

void CarlaPlugin::setActive(const bool active, const bool sendOsc, const bool sendCallback) noexcept
{
if (pData->engineBridged || pData->enginePlugin) {
if (pData->engineBridged) {
CARLA_SAFE_ASSERT_RETURN(!sendOsc && !sendCallback,);
} else if (pData->enginePlugin) {
// nothing here
} else {
CARLA_SAFE_ASSERT_RETURN(sendOsc || sendCallback,); // never call this from RT
}


+ 2
- 0
source/bridges-plugin/CarlaBridgeSingleLV2.cpp View File

@@ -388,6 +388,8 @@ protected:
switch (action)
{
case ENGINE_CALLBACK_PARAMETER_VALUE_CHANGED:
if (value1 == PARAMETER_ACTIVE)
return;
CARLA_SAFE_ASSERT_RETURN(value1 >= 0,);
if (fUI.writeFunction != nullptr && fUI.controller != nullptr && fUI.isVisible)
{


Loading…
Cancel
Save