Browse Source

Small fixups for jack engine

Signed-off-by: falkTX <falktx@falktx.com>
tags/v2.2.0-RC1
falkTX 5 years ago
parent
commit
fe95abf309
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
1 changed files with 12 additions and 3 deletions
  1. +12
    -3
      source/backend/engine/CarlaEngineJack.cpp

+ 12
- 3
source/backend/engine/CarlaEngineJack.cpp View File

@@ -2366,6 +2366,8 @@ public:
if (pData->options.processMode == ENGINE_PROCESS_MODE_PATCHBAY && ! external)
return CarlaEngine::getPatchbayPositions(external, count);

const CarlaMutexLocker cml(fUsedGroups.mutex);

if (const std::size_t maxCount = fUsedGroups.list.count())
{
PatchbayPosition* ret;
@@ -2378,8 +2380,6 @@ public:

GroupNameToId groupNameToId;

const CarlaMutexLocker cml1(fUsedGroups.mutex);

for (LinkedList<GroupNameToId>::Itenerator it = fUsedGroups.list.begin2(); it.valid(); it.next())
{
groupNameToId = it.getValue(kGroupNameToIdFallback);
@@ -2504,7 +2504,7 @@ public:
for (int i=10; --i >=0;)
{
{
const CarlaMutexLocker cml1(fUsedGroups.mutex);
const CarlaMutexLocker cml(fUsedGroups.mutex);

if (fUsedGroups.list.count() == 0)
{
@@ -2522,6 +2522,15 @@ public:
callback(true, true, ENGINE_CALLBACK_IDLE, 0, 0, 0, 0, 0.0f, nullptr);
}
}
else
{
const CarlaMutexLocker cml(fUsedGroups.mutex);

if (fUsedGroups.list.count() != 0)
groupId = fUsedGroups.getGroupId(ppos.name);
else
hasGroups = false;
}

if (hasGroups) {
CARLA_SAFE_ASSERT(groupId != 0);


Loading…
Cancel
Save