mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-18 12:46:32 +01:00
Fix restore of Jack driver setting
A small hack to ensure that the driver setting in the audio engine dialog is restored when ardour starts up and when switching drivers.
This commit is contained in:
parent
c3a5cd487a
commit
8b4eb07ab7
1 changed files with 24 additions and 2 deletions
|
|
@ -713,9 +713,20 @@ EngineControl::backend_changed ()
|
||||||
|
|
||||||
if (!drivers.empty()) {
|
if (!drivers.empty()) {
|
||||||
{
|
{
|
||||||
|
string current_driver;
|
||||||
|
current_driver = backend->driver_name ();
|
||||||
|
|
||||||
|
// driver might not have been set yet
|
||||||
|
if (current_driver == "") {
|
||||||
|
current_driver = driver_combo.get_active_text ();
|
||||||
|
if (current_driver == "")
|
||||||
|
// driver has never been set, make sure it's not blank
|
||||||
|
current_driver = drivers.front ();
|
||||||
|
}
|
||||||
|
|
||||||
PBD::Unwinder<uint32_t> protect_ignore_changes (ignore_changes, ignore_changes + 1);
|
PBD::Unwinder<uint32_t> protect_ignore_changes (ignore_changes, ignore_changes + 1);
|
||||||
set_popdown_strings (driver_combo, drivers);
|
set_popdown_strings (driver_combo, drivers);
|
||||||
driver_combo.set_active_text (drivers.front());
|
driver_combo.set_active_text (current_driver);
|
||||||
}
|
}
|
||||||
|
|
||||||
driver_changed ();
|
driver_changed ();
|
||||||
|
|
@ -797,9 +808,20 @@ EngineControl::list_devices ()
|
||||||
update_sensitivity ();
|
update_sensitivity ();
|
||||||
|
|
||||||
{
|
{
|
||||||
|
string current_device;
|
||||||
|
current_device = backend->device_name ();
|
||||||
|
if (current_device == "") {
|
||||||
|
// device might not have been set yet
|
||||||
|
current_device = device_combo.get_active_text ();
|
||||||
|
if (current_device == "")
|
||||||
|
// device has never been set, make sure it's not blank
|
||||||
|
current_device = available_devices.front ();
|
||||||
|
}
|
||||||
|
|
||||||
PBD::Unwinder<uint32_t> protect_ignore_changes (ignore_changes, ignore_changes + 1);
|
PBD::Unwinder<uint32_t> protect_ignore_changes (ignore_changes, ignore_changes + 1);
|
||||||
set_popdown_strings (device_combo, available_devices);
|
set_popdown_strings (device_combo, available_devices);
|
||||||
device_combo.set_active_text (available_devices.front());
|
|
||||||
|
device_combo.set_active_text (current_device);
|
||||||
}
|
}
|
||||||
|
|
||||||
device_changed ();
|
device_changed ();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue