Browse Source

Fix 0 BPM when starting carla as transport master, and not rolling

tags/v2.1-rc1
falkTX 5 years ago
parent
commit
302854ae65
3 changed files with 18 additions and 1 deletions
  1. +2
    -0
      source/backend/engine/CarlaEngine.cpp
  2. +14
    -0
      source/backend/engine/CarlaEngineJack.cpp
  3. +2
    -1
      source/frontend/carla_host.py

+ 2
- 0
source/backend/engine/CarlaEngine.cpp View File

@@ -1536,6 +1536,8 @@ void CarlaEngine::transportPause() noexcept

void CarlaEngine::transportBPM(const double bpm) noexcept
{
CARLA_SAFE_ASSERT_RETURN(bpm >= 20.0,)

try {
pData->time.setBPM(bpm);
} CARLA_SAFE_EXCEPTION("CarlaEngine::transportBPM");


+ 14
- 0
source/backend/engine/CarlaEngineJack.cpp View File

@@ -1221,6 +1221,20 @@ public:
}
#endif

void callback(const bool sendHost, const bool sendOsc,
const EngineCallbackOpcode action, const uint pluginId,
const int value1, const int value2, const int value3,
const float valuef, const char* const valueStr) noexcept override
{
if (action == ENGINE_CALLBACK_PROJECT_LOAD_FINISHED && fTimebaseMaster)
{
// project finished loading, need to set bpm here, so we force an update of timebase master
transportRelocate(pData->timeInfo.frame);
}

CarlaEngine::callback(sendHost, sendOsc, action, pluginId, value1, value2, value3, valuef, valueStr);
}

bool setBufferSizeAndSampleRate(const uint bufferSize, const double sampleRate) override
{
CARLA_SAFE_ASSERT_RETURN(carla_isEqual(pData->sampleRate, sampleRate), false);


+ 2
- 1
source/frontend/carla_host.py View File

@@ -838,7 +838,8 @@ class HostWindow(QMainWindow):
settings = QSettings()
lastBpm = settings.value("LastBPM", 120.0, type=float)
del settings
self.host.transport_bpm(lastBpm)
if lastBpm >= 20.0:
self.host.transport_bpm(lastBpm)
return

elif firstInit:


Loading…
Cancel
Save