Browse Source

Misc fixing

tags/1.9.5
falkTX 10 years ago
parent
commit
413bff2939
4 changed files with 19 additions and 7 deletions
  1. +8
    -4
      source/backend/engine/CarlaEngineJack.cpp
  2. +1
    -1
      source/backend/engine/CarlaEngineJuce.cpp
  3. +9
    -1
      source/backend/engine/CarlaEngineNative.cpp
  4. +1
    -1
      source/backend/engine/CarlaEngineRtAudio.cpp

+ 8
- 4
source/backend/engine/CarlaEngineJack.cpp View File

@@ -720,8 +720,11 @@ public:
carla_zeroStruct<jack_position_t>(fTransportPos);

#ifdef BUILD_BRIDGE
fIsRunning = true;

if (! pData->init(clientName))
{
close();
setLastError("Failed to init internal data");
return false;
}
@@ -738,13 +741,12 @@ public:
}
else
{
carla_stderr2("Failed to init temporary jack client");
close();
setLastError("Failed to init temporary jack client");
return false;
}
}

fIsRunning = true;

return true;
#else
fClient = jackbridge_client_open(clientName, JackNullOption, nullptr);
@@ -831,11 +833,13 @@ public:
carla_debug("CarlaEngineJack::close()");

#ifdef BUILD_BRIDGE
CarlaEngine::close();
fClient = nullptr;
fIsRunning = false;
CarlaEngine::close();
return true;
#else
CARLA_SAFE_ASSERT_RETURN_ERR(fClient != nullptr, "JACK Client is null");

// deactivate first
const bool deactivated(jackbridge_deactivate(fClient));



+ 1
- 1
source/backend/engine/CarlaEngineJuce.cpp View File

@@ -240,7 +240,7 @@ public:

bool isRunning() const noexcept override
{
return fDevice != nullptr && fDevice->isPlaying();
return fDevice != nullptr && fDevice->isOpen();
}

bool isOffline() const noexcept override


+ 9
- 1
source/backend/engine/CarlaEngineNative.cpp View File

@@ -646,6 +646,8 @@ protected:
{
carla_debug("CarlaEngineNative::init(\"%s\")", clientName);

fIsRunning = true;

if (! pData->init(clientName))
{
close();
@@ -656,7 +658,13 @@ protected:
pData->bufferSize = pHost->get_buffer_size(pHost->handle);
pData->sampleRate = pHost->get_sample_rate(pHost->handle);

fIsRunning = true;
return true;
}

bool close() override
{
fIsRunning = false;
CarlaEngine::close();
return true;
}



+ 1
- 1
source/backend/engine/CarlaEngineRtAudio.cpp View File

@@ -365,7 +365,7 @@ public:

bool isRunning() const noexcept override
{
return fAudio.isStreamRunning();
return fAudio.isStreamOpen();
}

bool isOffline() const noexcept override


Loading…
Cancel
Save