diff --git a/resources/ui/carla_settings_driver.ui b/resources/ui/carla_settings_driver.ui
index 02608f8ab..7d24bda75 100644
--- a/resources/ui/carla_settings_driver.ui
+++ b/resources/ui/carla_settings_driver.ui
@@ -6,109 +6,210 @@
0
0
- 403
+ 350
264
+
+
+ 350
+ 0
+
+
Driver Settings
-
- -
-
-
- Device:
-
-
- Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
-
-
-
- -
-
-
- -
-
-
- Qt::Horizontal
-
-
- QSizePolicy::Fixed
-
-
-
- 20
- 1
-
-
-
-
- -
-
-
- -
-
-
- Triple buffer
-
-
-
- -
-
-
- Qt::Horizontal
-
-
- QSizePolicy::Fixed
-
-
-
- 20
- 1
-
-
-
-
- -
-
-
- Sample rate:
-
-
- Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
-
-
+
+
-
+
+
-
+
+
+ -
+
+
+ Qt::Horizontal
+
+
+
+ 40
+ 20
+
+
+
+
+ -
+
+
+ Qt::Horizontal
+
+
+
+ 40
+ 20
+
+
+
+
+ -
+
+
+ -
+
+
+ Qt::Horizontal
+
+
+
+ 40
+ 20
+
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+ Device:
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+ Buffer size:
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+
+ -
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+ Sample rate:
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+
+
- -
-
-
- Buffer size:
-
-
- Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
-
-
+
-
+
+
-
+
+
+ Qt::Horizontal
+
+
+
+ 40
+ 20
+
+
+
+
+ -
+
+
+ Triple buffer
+
+
+
+ -
+
+
+ Qt::Horizontal
+
+
+
+ 40
+ 20
+
+
+
+
+
- -
-
-
- Qt::Horizontal
-
-
- QSizePolicy::Fixed
-
-
-
- 20
- 1
-
-
-
+
-
+
+
-
+
+
+ Qt::Horizontal
+
+
+ QSizePolicy::Preferred
+
+
+
+ 40
+ 20
+
+
+
+
+ -
+
+
+
+ 32
+ 0
+
+
+
+ Show Driver Control Panel
+
+
+
+ -
+
+
+ Qt::Horizontal
+
+
+ QSizePolicy::Preferred
+
+
+
+ 40
+ 20
+
+
+
+
+
- -
-
+
-
+
-
-
+
Qt::Horizontal
@@ -150,7 +251,7 @@
-
-
+
Qt::Horizontal
@@ -164,7 +265,7 @@
- -
+
-
Qt::Horizontal
@@ -174,32 +275,6 @@
- -
-
-
- Show Driver Control Panel
-
-
-
- -
-
-
- -
-
-
- Qt::Horizontal
-
-
- QSizePolicy::Fixed
-
-
-
- 40
- 1
-
-
-
-
diff --git a/source/backend/CarlaBackend.h b/source/backend/CarlaBackend.h
index 32ce201b4..be2cb1e3e 100644
--- a/source/backend/CarlaBackend.h
+++ b/source/backend/CarlaBackend.h
@@ -1199,16 +1199,22 @@ typedef enum {
*/
ENGINE_OPTION_AUDIO_TRIPLE_BUFFER = 11,
+ /*!
+ * Audio driver.
+ * Default depends on platform.
+ */
+ ENGINE_OPTION_AUDIO_DRIVER = 12,
+
/*!
* Audio device (within a driver).
* Default unset.
*/
- ENGINE_OPTION_AUDIO_DEVICE = 12,
+ ENGINE_OPTION_AUDIO_DEVICE = 13,
/*!
* Wherever to enable OSC support in the engine.
*/
- ENGINE_OPTION_OSC_ENABLED = 13,
+ ENGINE_OPTION_OSC_ENABLED = 14,
/*!
* The network TCP port to use for OSC.
@@ -1216,7 +1222,7 @@ typedef enum {
* A value of < 0 means to not enable the TCP port for OSC.
* @note Valid ports begin at 1024 and end at 32767 (inclusive)
*/
- ENGINE_OPTION_OSC_PORT_TCP = 14,
+ ENGINE_OPTION_OSC_PORT_TCP = 15,
/*!
* The network UDP port to use for OSC.
@@ -1225,81 +1231,81 @@ typedef enum {
* @note Disabling this option prevents DSSI UIs from working!
* @note Valid ports begin at 1024 and end at 32767 (inclusive)
*/
- ENGINE_OPTION_OSC_PORT_UDP = 15,
+ ENGINE_OPTION_OSC_PORT_UDP = 16,
/*!
* Set path used for a specific plugin type.
* Uses value as the plugin format, valueStr as actual path.
* @see PluginType
*/
- ENGINE_OPTION_PLUGIN_PATH = 16,
+ ENGINE_OPTION_PLUGIN_PATH = 17,
/*!
* Set path to the binary files.
* Default unset.
* @note Must be set for plugin and UI bridges to work
*/
- ENGINE_OPTION_PATH_BINARIES = 17,
+ ENGINE_OPTION_PATH_BINARIES = 18,
/*!
* Set path to the resource files.
* Default unset.
* @note Must be set for some internal plugins to work
*/
- ENGINE_OPTION_PATH_RESOURCES = 18,
+ ENGINE_OPTION_PATH_RESOURCES = 19,
/*!
* Prevent bad plugin and UI behaviour.
* @note: Linux only
*/
- ENGINE_OPTION_PREVENT_BAD_BEHAVIOUR = 19,
+ ENGINE_OPTION_PREVENT_BAD_BEHAVIOUR = 20,
/*!
* Set UI scaling used in frontend, so backend can do the same for plugin UIs.
*/
- ENGINE_OPTION_FRONTEND_UI_SCALE = 20,
+ ENGINE_OPTION_FRONTEND_UI_SCALE = 21,
/*!
* Set frontend winId, used to define as parent window for plugin UIs.
*/
- ENGINE_OPTION_FRONTEND_WIN_ID = 21,
+ ENGINE_OPTION_FRONTEND_WIN_ID = 22,
#if !defined(BUILD_BRIDGE_ALTERNATIVE_ARCH) && !defined(CARLA_OS_WIN)
/*!
* Set path to wine executable.
*/
- ENGINE_OPTION_WINE_EXECUTABLE = 22,
+ ENGINE_OPTION_WINE_EXECUTABLE = 23,
/*!
* Enable automatic wineprefix detection.
*/
- ENGINE_OPTION_WINE_AUTO_PREFIX = 23,
+ ENGINE_OPTION_WINE_AUTO_PREFIX = 24,
/*!
* Fallback wineprefix to use if automatic detection fails or is disabled, and WINEPREFIX is not set.
*/
- ENGINE_OPTION_WINE_FALLBACK_PREFIX = 24,
+ ENGINE_OPTION_WINE_FALLBACK_PREFIX = 25,
/*!
* Enable realtime priority for Wine application and server threads.
*/
- ENGINE_OPTION_WINE_RT_PRIO_ENABLED = 25,
+ ENGINE_OPTION_WINE_RT_PRIO_ENABLED = 26,
/*!
* Base realtime priority for Wine threads.
*/
- ENGINE_OPTION_WINE_BASE_RT_PRIO = 26,
+ ENGINE_OPTION_WINE_BASE_RT_PRIO = 27,
/*!
* Wine server realtime priority.
*/
- ENGINE_OPTION_WINE_SERVER_RT_PRIO = 27,
+ ENGINE_OPTION_WINE_SERVER_RT_PRIO = 28,
#endif
/*!
* Capture console output into debug callbacks.
*/
- ENGINE_OPTION_DEBUG_CONSOLE_OUTPUT = 28
+ ENGINE_OPTION_DEBUG_CONSOLE_OUTPUT = 29
} EngineOption;
diff --git a/source/backend/CarlaEngine.hpp b/source/backend/CarlaEngine.hpp
index 6b7064859..8167d5b4b 100644
--- a/source/backend/CarlaEngine.hpp
+++ b/source/backend/CarlaEngine.hpp
@@ -240,6 +240,7 @@ struct CARLA_API EngineOptions {
uint audioBufferSize;
uint audioSampleRate;
bool audioTripleBuffer;
+ const char* audioDriver;
const char* audioDevice;
#ifndef BUILD_BRIDGE
diff --git a/source/backend/CarlaHost.h b/source/backend/CarlaHost.h
index 85430e9df..31bfdd3f3 100644
--- a/source/backend/CarlaHost.h
+++ b/source/backend/CarlaHost.h
@@ -422,6 +422,7 @@ CARLA_EXPORT bool carla_is_engine_running();
*/
CARLA_EXPORT const CarlaRuntimeEngineInfo* carla_get_runtime_engine_info();
+#ifndef BUILD_BRIDGE
/*!
* Get information about the currently running engine driver device.
*/
@@ -439,6 +440,7 @@ CARLA_EXPORT bool carla_set_engine_buffer_size_and_sample_rate(uint bufferSize,
* @see ENGINE_DRIVER_DEVICE_HAS_CONTROL_PANEL
*/
CARLA_EXPORT bool carla_show_engine_device_control_panel();
+#endif
/*!
* Clear the xrun count on the engine, so that the next time carla_get_runtime_engine_info() is called, it returns 0.
diff --git a/source/backend/CarlaStandalone.cpp b/source/backend/CarlaStandalone.cpp
index a2ea3d409..69aa181cb 100644
--- a/source/backend/CarlaStandalone.cpp
+++ b/source/backend/CarlaStandalone.cpp
@@ -255,6 +255,9 @@ static void carla_engine_init_common(CarlaEngine* const engine)
engine->setOption(CB::ENGINE_OPTION_AUDIO_SAMPLE_RATE, static_cast(gStandalone.engineOptions.audioSampleRate), nullptr);
engine->setOption(CB::ENGINE_OPTION_AUDIO_TRIPLE_BUFFER, gStandalone.engineOptions.audioTripleBuffer ? 1 : 0, nullptr);
+ if (gStandalone.engineOptions.audioDriver != nullptr)
+ engine->setOption(CB::ENGINE_OPTION_AUDIO_DRIVER, 0, gStandalone.engineOptions.audioDriver);
+
if (gStandalone.engineOptions.audioDevice != nullptr)
engine->setOption(CB::ENGINE_OPTION_AUDIO_DEVICE, 0, gStandalone.engineOptions.audioDevice);
@@ -498,6 +501,7 @@ const CarlaRuntimeEngineInfo* carla_get_runtime_engine_info()
return &retInfo;
}
+#ifndef BUILD_BRIDGE
const CarlaRuntimeEngineDriverDeviceInfo* carla_get_runtime_engine_driver_device_info()
{
static CarlaRuntimeEngineDriverDeviceInfo retInfo;
@@ -510,8 +514,27 @@ const CarlaRuntimeEngineDriverDeviceInfo* carla_get_runtime_engine_driver_device
retInfo.sampleRate = 0.0;
retInfo.sampleRates = nullptr;
- CARLA_SAFE_ASSERT_RETURN(gStandalone.engine != nullptr, &retInfo);
- const char* const audioDriver = gStandalone.engine->getCurrentDriverName();
+ const char* audioDriver;
+ const char* audioDevice;
+
+ if (CarlaEngine* const engine = gStandalone.engine)
+ {
+ audioDriver = engine->getCurrentDriverName();
+ audioDevice = engine->getOptions().audioDevice;
+
+ retInfo.bufferSize = engine->getBufferSize();
+ retInfo.sampleRate = engine->getSampleRate();
+ }
+ else
+ {
+ audioDriver = gStandalone.engineOptions.audioDriver;
+ audioDevice = gStandalone.engineOptions.audioDevice;
+
+ retInfo.bufferSize = gStandalone.engineOptions.audioBufferSize;
+ retInfo.sampleRate = gStandalone.engineOptions.audioSampleRate;
+ }
+ CARLA_SAFE_ASSERT_RETURN(audioDriver != nullptr, &retInfo);
+ CARLA_SAFE_ASSERT_RETURN(audioDevice != nullptr, &retInfo);
uint index = 0;
uint count = CarlaEngine::getDriverCount();
@@ -525,17 +548,12 @@ const CarlaRuntimeEngineDriverDeviceInfo* carla_get_runtime_engine_driver_device
}
CARLA_SAFE_ASSERT_RETURN(index != count, &retInfo);
- const EngineOptions& options(gStandalone.engine->getOptions());
- const char* const audioDevice = options.audioDevice;
-
const EngineDriverDeviceInfo* const devInfo = CarlaEngine::getDriverDeviceInfo(index, audioDevice);
CARLA_SAFE_ASSERT_RETURN(devInfo != nullptr, &retInfo);
retInfo.name = audioDevice;
retInfo.hints = devInfo->hints;
- retInfo.bufferSize = gStandalone.engine->getBufferSize();
retInfo.bufferSizes = devInfo->bufferSizes;
- retInfo.sampleRate = gStandalone.engine->getSampleRate();
retInfo.sampleRates = devInfo->sampleRates;
return &retInfo;
@@ -556,6 +574,7 @@ bool carla_show_engine_device_control_panel()
return gStandalone.engine->showDeviceControlPanel();
}
+#endif
void carla_clear_engine_xruns()
{
@@ -676,6 +695,15 @@ void carla_set_engine_option(EngineOption option, int value, const char* valueSt
gStandalone.engineOptions.audioTripleBuffer = (value != 0);
break;
+ case CB::ENGINE_OPTION_AUDIO_DRIVER:
+ CARLA_SAFE_ASSERT_RETURN(valueStr != nullptr,);
+
+ if (gStandalone.engineOptions.audioDriver != nullptr)
+ delete[] gStandalone.engineOptions.audioDriver;
+
+ gStandalone.engineOptions.audioDriver = carla_strdup_safe(valueStr);
+ break;
+
case CB::ENGINE_OPTION_AUDIO_DEVICE:
CARLA_SAFE_ASSERT_RETURN(valueStr != nullptr,);
diff --git a/source/backend/engine/CarlaEngine.cpp b/source/backend/engine/CarlaEngine.cpp
index 702713e75..051f614d3 100644
--- a/source/backend/engine/CarlaEngine.cpp
+++ b/source/backend/engine/CarlaEngine.cpp
@@ -1604,6 +1604,7 @@ void CarlaEngine::setOption(const EngineOption option, const int value, const ch
{
case ENGINE_OPTION_PROCESS_MODE:
case ENGINE_OPTION_AUDIO_TRIPLE_BUFFER:
+ case ENGINE_OPTION_AUDIO_DRIVER:
case ENGINE_OPTION_AUDIO_DEVICE:
return carla_stderr("CarlaEngine::setOption(%i:%s, %i, \"%s\") - Cannot set this option while engine is running!",
option, EngineOption2Str(option), value, valueStr);
@@ -1696,6 +1697,15 @@ void CarlaEngine::setOption(const EngineOption option, const int value, const ch
pData->options.audioTripleBuffer = (value != 0);
break;
+ case ENGINE_OPTION_AUDIO_DRIVER:
+ CARLA_SAFE_ASSERT_RETURN(valueStr != nullptr,);
+
+ if (pData->options.audioDriver != nullptr)
+ delete[] pData->options.audioDriver;
+
+ pData->options.audioDriver = carla_strdup_safe(valueStr);
+ break;
+
case ENGINE_OPTION_AUDIO_DEVICE:
CARLA_SAFE_ASSERT_RETURN(valueStr != nullptr,);
diff --git a/source/backend/engine/CarlaEngineData.cpp b/source/backend/engine/CarlaEngineData.cpp
index fe4a2316f..a2480ad3f 100644
--- a/source/backend/engine/CarlaEngineData.cpp
+++ b/source/backend/engine/CarlaEngineData.cpp
@@ -197,6 +197,7 @@ EngineOptions::EngineOptions() noexcept
audioBufferSize(512),
audioSampleRate(44100),
audioTripleBuffer(false),
+ audioDriver(nullptr),
audioDevice(nullptr),
#ifndef BUILD_BRIDGE
# ifdef CARLA_OS_WIN
@@ -226,6 +227,12 @@ EngineOptions::EngineOptions() noexcept
EngineOptions::~EngineOptions() noexcept
{
+ if (audioDriver != nullptr)
+ {
+ delete[] audioDriver;
+ audioDriver = nullptr;
+ }
+
if (audioDevice != nullptr)
{
delete[] audioDevice;
diff --git a/source/backend/engine/CarlaEngineJack.cpp b/source/backend/engine/CarlaEngineJack.cpp
index 3493a95d2..ec36c24e7 100644
--- a/source/backend/engine/CarlaEngineJack.cpp
+++ b/source/backend/engine/CarlaEngineJack.cpp
@@ -3000,6 +3000,7 @@ int jack_initialize(jack_client_t* const client, const char* const load_init)
CarlaEngineJack* const engine = new CarlaEngineJack();
engine->setOption(ENGINE_OPTION_FORCE_STEREO, 1, nullptr);
+ engine->setOption(ENGINE_OPTION_AUDIO_DRIVER, 0, "JACK");
engine->setOption(ENGINE_OPTION_AUDIO_DEVICE, 0, "Auto-Connect ON");
engine->setOption(ENGINE_OPTION_OSC_ENABLED, 1, nullptr);
engine->setOption(ENGINE_OPTION_OSC_PORT_TCP, 22752, nullptr);
diff --git a/source/frontend/carla_backend.py b/source/frontend/carla_backend.py
index cb1ac2eb4..dddc2a52a 100644
--- a/source/frontend/carla_backend.py
+++ b/source/frontend/carla_backend.py
@@ -861,71 +861,75 @@ ENGINE_OPTION_AUDIO_SAMPLE_RATE = 10
# Default is false.
ENGINE_OPTION_AUDIO_TRIPLE_BUFFER = 11
+# Audio driver.
+# Default dppends on platform.
+ENGINE_OPTION_AUDIO_DRIVER = 12
+
# Audio device (within a driver).
# Default unset.
-ENGINE_OPTION_AUDIO_DEVICE = 12
+ENGINE_OPTION_AUDIO_DEVICE = 13
# Wherever to enable OSC support in the engine.
-ENGINE_OPTION_OSC_ENABLED = 13
+ENGINE_OPTION_OSC_ENABLED = 14
# The network TCP port to use for OSC.
# A value of 0 means use a random port.
# A value of < 0 means to not enable the TCP port for OSC.
# @note Valid ports begin at 1024 and end at 32767 (inclusive)
-ENGINE_OPTION_OSC_PORT_TCP = 14
+ENGINE_OPTION_OSC_PORT_TCP = 15
# The network UDP port to use for OSC.
# A value of 0 means use a random port.
# A value of < 0 means to not enable the UDP port for OSC.
# @note Disabling this option prevents DSSI UIs from working!
# @note Valid ports begin at 1024 and end at 32767 (inclusive)
-ENGINE_OPTION_OSC_PORT_UDP = 15
+ENGINE_OPTION_OSC_PORT_UDP = 16
# Set path used for a specific plugin type.
# Uses value as the plugin format, valueStr as actual path.
# @see PluginType
-ENGINE_OPTION_PLUGIN_PATH = 16
+ENGINE_OPTION_PLUGIN_PATH = 17
# Set path to the binary files.
# Default unset.
# @note Must be set for plugin and UI bridges to work
-ENGINE_OPTION_PATH_BINARIES = 17
+ENGINE_OPTION_PATH_BINARIES = 18
# Set path to the resource files.
# Default unset.
# @note Must be set for some internal plugins to work
-ENGINE_OPTION_PATH_RESOURCES = 18
+ENGINE_OPTION_PATH_RESOURCES = 19
# Prevent bad plugin and UI behaviour.
# @note: Linux only
-ENGINE_OPTION_PREVENT_BAD_BEHAVIOUR = 19
+ENGINE_OPTION_PREVENT_BAD_BEHAVIOUR = 20
# Set UI scaling used in frontend, so backend can do the same for plugin UIs.
-ENGINE_OPTION_FRONTEND_UI_SCALE = 20
+ENGINE_OPTION_FRONTEND_UI_SCALE = 21
# Set frontend winId, used to define as parent window for plugin UIs.
-ENGINE_OPTION_FRONTEND_WIN_ID = 21
+ENGINE_OPTION_FRONTEND_WIN_ID = 22
# Set path to wine executable.
-ENGINE_OPTION_WINE_EXECUTABLE = 22
+ENGINE_OPTION_WINE_EXECUTABLE = 23
# Enable automatic wineprefix detection.
-ENGINE_OPTION_WINE_AUTO_PREFIX = 23
+ENGINE_OPTION_WINE_AUTO_PREFIX = 24
# Fallback wineprefix to use if automatic detection fails or is disabled, and WINEPREFIX is not set.
-ENGINE_OPTION_WINE_FALLBACK_PREFIX = 24
+ENGINE_OPTION_WINE_FALLBACK_PREFIX = 25
# Enable realtime priority for Wine application and server threads.
-ENGINE_OPTION_WINE_RT_PRIO_ENABLED = 25
+ENGINE_OPTION_WINE_RT_PRIO_ENABLED = 26
# Base realtime priority for Wine threads.
-ENGINE_OPTION_WINE_BASE_RT_PRIO = 26
+ENGINE_OPTION_WINE_BASE_RT_PRIO = 27
# Wine server realtime priority.
-ENGINE_OPTION_WINE_SERVER_RT_PRIO = 27
+ENGINE_OPTION_WINE_SERVER_RT_PRIO = 28
# Capture console output into debug callbacks
-ENGINE_OPTION_DEBUG_CONSOLE_OUTPUT = 28
+ENGINE_OPTION_DEBUG_CONSOLE_OUTPUT = 29
# ------------------------------------------------------------------------------------------------------------
# Engine Process Mode
diff --git a/source/frontend/carla_host.py b/source/frontend/carla_host.py
index 27870fa8e..33a35f080 100644
--- a/source/frontend/carla_host.py
+++ b/source/frontend/carla_host.py
@@ -876,12 +876,14 @@ class HostWindow(QMainWindow):
if not dialog.exec_():
return
- if not self.host.is_engine_running():
- QMessageBox.warning(self, self.tr("Warning"), self.tr("Engine was stopped while configuring settings, all changes have been ignored"))
- return
+ audioDevice, bufferSize, sampleRate = dialog.getValues()
- bufferSize, sampleRate = dialog.getValues()
- self.host.set_engine_buffer_size_and_sample_rate(bufferSize, sampleRate)
+ if self.host.is_engine_running():
+ self.host.set_engine_buffer_size_and_sample_rate(bufferSize, sampleRate)
+ else:
+ self.host.set_engine_option(ENGINE_OPTION_AUDIO_DEVICE, 0, audioDevice)
+ self.host.set_engine_option(ENGINE_OPTION_AUDIO_BUFFER_SIZE, bufferSize, "")
+ self.host.set_engine_option(ENGINE_OPTION_AUDIO_SAMPLE_RATE, sampleRate, "")
@pyqtSlot()
def slot_engineStopTryAgain(self):
@@ -3198,6 +3200,7 @@ def setEngineSettings(host):
# Only setup audio things if engine is not running
if not host.is_engine_running():
+ host.set_engine_option(ENGINE_OPTION_AUDIO_DRIVER, 0, audioDriver)
host.set_engine_option(ENGINE_OPTION_AUDIO_DEVICE, 0, audioDevice)
if not audioDriver.startswith("JACK"):
diff --git a/source/frontend/carla_settings.py b/source/frontend/carla_settings.py
index af8738186..f1c1f9f96 100755
--- a/source/frontend/carla_settings.py
+++ b/source/frontend/carla_settings.py
@@ -219,7 +219,6 @@ class RuntimeDriverSettingsW(QDialog):
# ----------------------------------------------------------------------------------------------------
# Set-up GUI
- self.ui.cb_device.setEnabled(False)
self.ui.cb_device.clear()
self.ui.cb_buffersize.clear()
self.ui.cb_samplerate.clear()
@@ -227,15 +226,30 @@ class RuntimeDriverSettingsW(QDialog):
self.ui.ico_restart.hide()
self.ui.label_restart.hide()
+ self.ui.layout_triple_buffer.takeAt(2)
+ self.ui.layout_triple_buffer.takeAt(1)
+ self.ui.layout_triple_buffer.takeAt(0)
+ self.ui.verticalLayout.removeItem(self.ui.layout_triple_buffer)
+
+ self.ui.layout_restart.takeAt(3)
+ self.ui.layout_restart.takeAt(2)
+ self.ui.layout_restart.takeAt(1)
+ self.ui.layout_restart.takeAt(0)
+ self.ui.verticalLayout.removeItem(self.ui.layout_restart)
+
self.adjustSize()
self.setWindowFlags(self.windowFlags() & ~Qt.WindowContextHelpButtonHint)
- #self.setFixedSize(self.size())
# ----------------------------------------------------------------------------------------------------
# Load runtime settings
- self.ui.cb_device.addItem(driverDeviceInfo['name'])
- self.ui.cb_device.setCurrentIndex(0)
+ if host.is_engine_running():
+ self.ui.cb_device.addItem(driverDeviceInfo['name'])
+ self.ui.cb_device.setCurrentIndex(0)
+ self.ui.cb_device.setEnabled(False)
+ else:
+ self.ui.cb_device.addItem(driverDeviceInfo['name'])
+ self.ui.cb_device.setCurrentIndex(0)
if len(driverDeviceInfo['bufferSizes']) > 0:
for bsize in driverDeviceInfo['bufferSizes']:
@@ -278,15 +292,16 @@ class RuntimeDriverSettingsW(QDialog):
# --------------------------------------------------------------------------------------------------------
def getValues(self):
- bufferSize = self.ui.cb_buffersize.currentText()
- sampleRate = self.ui.cb_samplerate.currentText()
+ audioDevice = self.ui.cb_buffersize.currentText()
+ bufferSize = self.ui.cb_buffersize.currentText()
+ sampleRate = self.ui.cb_samplerate.currentText()
if bufferSize == DriverSettingsW.AUTOMATIC_OPTION:
bufferSize = "0"
if sampleRate == DriverSettingsW.AUTOMATIC_OPTION:
sampleRate = "0"
- return (int(bufferSize), int(sampleRate))
+ return (audioDevice, int(bufferSize), int(sampleRate))
# --------------------------------------------------------------------------------------------------------
diff --git a/source/utils/CarlaBackendUtils.hpp b/source/utils/CarlaBackendUtils.hpp
index f84a75d66..648682e41 100644
--- a/source/utils/CarlaBackendUtils.hpp
+++ b/source/utils/CarlaBackendUtils.hpp
@@ -327,6 +327,8 @@ const char* EngineOption2Str(const EngineOption option) noexcept
return "ENGINE_OPTION_AUDIO_SAMPLE_RATE";
case ENGINE_OPTION_AUDIO_TRIPLE_BUFFER:
return "ENGINE_OPTION_AUDIO_TRIPLE_BUFFER";
+ case ENGINE_OPTION_AUDIO_DRIVER:
+ return "ENGINE_OPTION_AUDIO_DRIVER";
case ENGINE_OPTION_AUDIO_DEVICE:
return "ENGINE_OPTION_AUDIO_DEVICE";
case ENGINE_OPTION_OSC_ENABLED: