From 4b34563f1a2b2fbe8830a990538360179ae47035 Mon Sep 17 00:00:00 2001 From: falkTX Date: Sun, 31 Aug 2014 03:12:24 +0100 Subject: [PATCH] Fix build --- source/backend/engine/CarlaEngineBridge.cpp | 7 ++++++- source/backend/engine/CarlaEngineJack.cpp | 13 ++++++++++++- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/source/backend/engine/CarlaEngineBridge.cpp b/source/backend/engine/CarlaEngineBridge.cpp index 151ffca62..8173ce9e8 100644 --- a/source/backend/engine/CarlaEngineBridge.cpp +++ b/source/backend/engine/CarlaEngineBridge.cpp @@ -254,6 +254,12 @@ public: { carla_debug("CarlaEngineBridge::init(\"%s\")", clientName); + if (! pData->init(clientName)) + { + setLastError("Failed to init internal data"); + return false; + } + if (! fShmAudioPool.attach()) { carla_stdout("Failed to attach to audio pool shared memory"); @@ -318,7 +324,6 @@ public: startThread(); - CarlaEngine::init(clientName); return true; } diff --git a/source/backend/engine/CarlaEngineJack.cpp b/source/backend/engine/CarlaEngineJack.cpp index e6c2e69c0..d8c222e96 100644 --- a/source/backend/engine/CarlaEngineJack.cpp +++ b/source/backend/engine/CarlaEngineJack.cpp @@ -720,6 +720,12 @@ public: carla_zeroStruct(fTransportPos); #ifdef BUILD_BRIDGE + if (! pData->init(clientName)) + { + setLastError("Failed to init internal data"); + return false; + } + if (pData->bufferSize == 0 || carla_compareFloats(pData->sampleRate, 0.0)) { // open temp client to get initial buffer-size and sample-rate values @@ -739,7 +745,7 @@ public: fIsRunning = true; - return CarlaEngine::init(clientName); + return true; #else fClient = jackbridge_client_open(clientName, JackNullOption, nullptr); @@ -752,7 +758,12 @@ public: const char* const jackClientName(jackbridge_get_client_name(fClient)); if (! pData->init(jackClientName)) + { + jackbridge_client_close(fClient); + fClient = nullptr; + setLastError("Failed to init internal data"); return false; + } pData->bufferSize = jackbridge_get_buffer_size(fClient); pData->sampleRate = jackbridge_get_sample_rate(fClient);