Browse Source

Fix carla-control adding more than 1 plugin

Signed-off-by: falkTX <falktx@falktx.com>
tags/v2.2.0-RC1
falkTX 4 years ago
parent
commit
fac7ee78dd
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
1 changed files with 12 additions and 1 deletions
  1. +12
    -1
      source/frontend/carla_backend.py

+ 12
- 1
source/frontend/carla_backend.py View File

@@ -3638,6 +3638,11 @@ class CarlaHostPlugin(CarlaHostMeta):
def _add(self, pluginId):
self.fPluginsInfo[pluginId] = PluginStoreInfo()

def _reset(self, maxPluginId):
self.fPluginsInfo = {}
for i in range(maxPluginId):
self.fPluginsInfo[i] = PluginStoreInfo()

def _allocateAsNeeded(self, pluginId):
if pluginId < len(self.fPluginsInfo):
return
@@ -3893,9 +3898,15 @@ class CarlaHostPlugin(CarlaHostMeta):

def _setViaCallback(self, action, pluginId, value1, value2, value3, valuef, valueStr):
if action == ENGINE_CALLBACK_ENGINE_STARTED:
self._allocateAsNeeded(pluginId)
self.fBufferSize = value3
self.fSampleRate = valuef
if value1 == ENGINE_PROCESS_MODE_CONTINUOUS_RACK:
maxPluginId = MAX_RACK_PLUGINS
elif value1 == ENGINE_PROCESS_MODE_PATCHBAY:
maxPluginId = MAX_PATCHBAY_PLUGINS
else:
maxPluginId = MAX_DEFAULT_PLUGINS
self._reset(maxPluginId)

elif ENGINE_CALLBACK_BUFFER_SIZE_CHANGED:
self.fBufferSize = value1


Loading…
Cancel
Save