|
|
@@ -50,9 +50,6 @@ |
|
|
|
# include <xmmintrin.h> |
|
|
|
#endif |
|
|
|
|
|
|
|
#define CARLA_SKIP_FUTEXES |
|
|
|
#include "CarlaSemUtils.hpp" |
|
|
|
|
|
|
|
// must be last |
|
|
|
#include "jackbridge/JackBridge.hpp" |
|
|
|
|
|
|
@@ -1385,7 +1382,6 @@ public: |
|
|
|
fLastPatchbaySetGroupPos(), |
|
|
|
fPostPonedEvents(), |
|
|
|
fPostPonedEventsMutex(), |
|
|
|
fPostPonedEventsSemaphore(), |
|
|
|
fPostPonedUUIDs(), |
|
|
|
fPostPonedUUIDsMutex(), |
|
|
|
fIsInternalClient(false) |
|
|
@@ -1397,7 +1393,6 @@ public: |
|
|
|
pData->options.processMode = ENGINE_PROCESS_MODE_MULTIPLE_CLIENTS; |
|
|
|
#else |
|
|
|
carla_zeroPointers(fRackPorts, kRackPortCount); |
|
|
|
carla_sem_create2(fPostPonedEventsSemaphore, false); |
|
|
|
#endif |
|
|
|
} |
|
|
|
|
|
|
@@ -1410,7 +1405,6 @@ public: |
|
|
|
fUsedGroups.clear(); |
|
|
|
fUsedPorts.clear(); |
|
|
|
fUsedConnections.clear(); |
|
|
|
carla_sem_destroy2(fPostPonedEventsSemaphore); |
|
|
|
CARLA_SAFE_ASSERT(fPostPonedEvents.count() == 0); |
|
|
|
#endif |
|
|
|
} |
|
|
@@ -2430,9 +2424,7 @@ public: |
|
|
|
jack_uuid_t uuid; |
|
|
|
{ |
|
|
|
char* const uuidstr = jackbridge_get_uuid_for_client_name(fClient, groupName); |
|
|
|
|
|
|
|
if (uuidstr == nullptr || uuidstr[0] == '\0') |
|
|
|
return false; |
|
|
|
CARLA_SAFE_ASSERT_RETURN(uuidstr != nullptr && uuidstr[0] != '\0', false); |
|
|
|
|
|
|
|
const bool parsed = jackbridge_uuid_parse(uuidstr, &uuid); |
|
|
|
jackbridge_free(uuidstr); |
|
|
@@ -3596,9 +3588,7 @@ private: |
|
|
|
jack_uuid_t uuid; |
|
|
|
{ |
|
|
|
char* const uuidstr = jackbridge_get_uuid_for_client_name(fClient, clientName); |
|
|
|
|
|
|
|
if (uuidstr == nullptr || uuidstr[0] == '\0') |
|
|
|
return; |
|
|
|
CARLA_SAFE_ASSERT_RETURN(uuidstr != nullptr && uuidstr[0] != '\0',); |
|
|
|
|
|
|
|
const bool parsed = jackbridge_uuid_parse(uuidstr, &uuid); |
|
|
|
jackbridge_free(uuidstr); |
|
|
@@ -3934,9 +3924,7 @@ private: |
|
|
|
jack_uuid_t uuid; |
|
|
|
{ |
|
|
|
char* const uuidstr = jackbridge_get_uuid_for_client_name(fClient, group.strVal); |
|
|
|
|
|
|
|
if (uuidstr == nullptr || uuidstr[0] == '\0') |
|
|
|
continue; |
|
|
|
CARLA_SAFE_ASSERT_CONTINUE(uuidstr != nullptr && uuidstr[0] != '\0'); |
|
|
|
|
|
|
|
const bool parsed = jackbridge_uuid_parse(uuidstr, &uuid); |
|
|
|
jackbridge_free(uuidstr); |
|
|
@@ -4177,7 +4165,6 @@ private: |
|
|
|
|
|
|
|
LinkedList<PostPonedJackEvent> fPostPonedEvents; |
|
|
|
CarlaMutex fPostPonedEventsMutex; |
|
|
|
carla_sem_t fPostPonedEventsSemaphore; |
|
|
|
|
|
|
|
water::Array<jack_uuid_t> fPostPonedUUIDs; |
|
|
|
CarlaMutex fPostPonedUUIDsMutex; |
|
|
@@ -4186,11 +4173,8 @@ private: |
|
|
|
|
|
|
|
void postPoneJackCallback(PostPonedJackEvent& ev) |
|
|
|
{ |
|
|
|
{ |
|
|
|
const CarlaMutexLocker cml(fPostPonedEventsMutex); |
|
|
|
fPostPonedEvents.append(ev); |
|
|
|
} |
|
|
|
carla_sem_post(fPostPonedEventsSemaphore); |
|
|
|
const CarlaMutexLocker cml(fPostPonedEventsMutex); |
|
|
|
fPostPonedEvents.append(ev); |
|
|
|
} |
|
|
|
|
|
|
|
void run() override |
|
|
@@ -4205,7 +4189,6 @@ private: |
|
|
|
if (fIsInternalClient) |
|
|
|
idle(); |
|
|
|
|
|
|
|
if (carla_sem_timedwait(fPostPonedEventsSemaphore, fIsInternalClient ? 50 : 1000)) |
|
|
|
{ |
|
|
|
const CarlaMutexLocker cml(fPostPonedEventsMutex); |
|
|
|
|
|
|
@@ -4217,7 +4200,10 @@ private: |
|
|
|
break; |
|
|
|
|
|
|
|
if (events.count() == 0) |
|
|
|
{ |
|
|
|
carla_msleep(fIsInternalClient ? 50 : 200); |
|
|
|
continue; |
|
|
|
} |
|
|
|
|
|
|
|
for (LinkedList<PostPonedJackEvent>::Itenerator it = events.begin2(); it.valid(); it.next()) |
|
|
|
{ |
|
|
|