From 73c637d3992446651c899ad11d7068f92a74bd28 Mon Sep 17 00:00:00 2001 From: falkTX Date: Thu, 2 Jan 2014 12:14:39 +0000 Subject: [PATCH] Misc --- source/backend/engine/CarlaEngineNative.cpp | 4 +-- source/carla_host.py | 29 ++++++++++++--------- 2 files changed, 18 insertions(+), 15 deletions(-) diff --git a/source/backend/engine/CarlaEngineNative.cpp b/source/backend/engine/CarlaEngineNative.cpp index a881251aa..2b40ce2f0 100644 --- a/source/backend/engine/CarlaEngineNative.cpp +++ b/source/backend/engine/CarlaEngineNative.cpp @@ -914,7 +914,7 @@ static const NativePluginDescriptor carlaRackDesc = { /* paramIns */ 0, /* paramOuts */ 0, /* name */ "Carla-Rack", - /* label */ "carla", + /* label */ "carla-rack", /* maker */ "falkTX", /* copyright */ "GNU GPL v2+", CarlaEngineNative::_instantiateRack, @@ -953,7 +953,7 @@ static const NativePluginDescriptor carlaPatchbayDesc = { /* paramIns */ 0, /* paramOuts */ 0, /* name */ "Carla-Patchbay", - /* label */ "carla", + /* label */ "carla-patchbay", /* maker */ "falkTX", /* copyright */ "GNU GPL v2+", CarlaEngineNative::_instantiatePatchbay, diff --git a/source/carla_host.py b/source/carla_host.py index 804ed633e..e150d98c1 100644 --- a/source/carla_host.py +++ b/source/carla_host.py @@ -175,6 +175,9 @@ class HostWindow(QMainWindow): # when true, call engineChanged() asap self.fEngineChanged = False + # first attempt of auto-start engine doesn't show an error + self.fFirstEngineInit = True + self.fSavedSettings = {} if LADISH_APP_NAME: @@ -366,19 +369,19 @@ class HostWindow(QMainWindow): audioDriver = settings.value("Engine/AudioDriver", CARLA_DEFAULT_AUDIO_DRIVER, type=str) if audioDriver == "JACK": - #transportMode = settings.value("Engine/TransportMode", TRANSPORT_MODE_JACK, type=int) transportMode = ENGINE_TRANSPORT_MODE_JACK else: transportMode = ENGINE_TRANSPORT_MODE_INTERNAL - audioNumPeriods = settings.value("Engine/AudioBufferSize", CARLA_DEFAULT_AUDIO_NUM_PERIODS, type=int) - audioBufferSize = settings.value("Engine/AudioBufferSize", CARLA_DEFAULT_AUDIO_BUFFER_SIZE, type=int) - audioSampleRate = settings.value("Engine/AudioSampleRate", CARLA_DEFAULT_AUDIO_SAMPLE_RATE, type=int) - audioDevice = settings.value("Engine/AudioDevice", "", type=str) - Carla.host.set_engine_option(ENGINE_OPTION_AUDIO_NUM_PERIODS, audioNumPeriods, "") - Carla.host.set_engine_option(ENGINE_OPTION_AUDIO_BUFFER_SIZE, audioBufferSize, "") - Carla.host.set_engine_option(ENGINE_OPTION_AUDIO_SAMPLE_RATE, audioSampleRate, "") - Carla.host.set_engine_option(ENGINE_OPTION_AUDIO_DEVICE, 0, audioDevice) + audioNumPeriods = settings.value("Engine/AudioBufferSize", CARLA_DEFAULT_AUDIO_NUM_PERIODS, type=int) + audioBufferSize = settings.value("Engine/AudioBufferSize", CARLA_DEFAULT_AUDIO_BUFFER_SIZE, type=int) + audioSampleRate = settings.value("Engine/AudioSampleRate", CARLA_DEFAULT_AUDIO_SAMPLE_RATE, type=int) + audioDevice = settings.value("Engine/AudioDevice", "", type=str) + + Carla.host.set_engine_option(ENGINE_OPTION_AUDIO_NUM_PERIODS, audioNumPeriods, "") + Carla.host.set_engine_option(ENGINE_OPTION_AUDIO_BUFFER_SIZE, audioBufferSize, "") + Carla.host.set_engine_option(ENGINE_OPTION_AUDIO_SAMPLE_RATE, audioSampleRate, "") + Carla.host.set_engine_option(ENGINE_OPTION_AUDIO_DEVICE, 0, audioDevice) if Carla.processMode == ENGINE_PROCESS_MODE_CONTINUOUS_RACK: forceStereo = True @@ -401,9 +404,9 @@ class HostWindow(QMainWindow): audioDriver = self.setEngineSettings() if not Carla.host.engine_init(audioDriver, self.fClientName): - #if self.fFirstEngineInit: - #self.fFirstEngineInit = False - #return + if self.fFirstEngineInit: + self.fFirstEngineInit = False + return audioError = Carla.host.get_last_error() @@ -413,7 +416,7 @@ class HostWindow(QMainWindow): QMessageBox.critical(self, self.tr("Error"), self.tr("Could not connect to Audio backend '%s'" % audioDriver)) return - #self.fFirstEngineInit = False + self.fFirstEngineInit = False def stopEngine(self): if self.fContainer.getPluginCount() > 0: