Retain devices when device list changes

EngineControl::device_list_changed calls
list_devices, which clears and refills the
I/O dropdown. This resulted in changed callbacks
EngineControl::input_device_changed which in turn
unsets the device in the backend:
set_input_device_name("").

The I/O devices were reset (use first available).
This commit is contained in:
Robin Gareus 2021-05-29 17:54:20 +02:00
parent df0571892f
commit adcc5be728
1 changed files with 2 additions and 0 deletions

View File

@ -1365,6 +1365,7 @@ EngineControl::list_devices ()
bool devices_available = false;
block_changed_signals ();
if (backend->use_separate_input_and_output_devices ()) {
bool input_devices_available = set_input_device_popdown_strings ();
bool output_devices_available = set_output_device_popdown_strings ();
@ -1372,6 +1373,7 @@ EngineControl::list_devices ()
} else {
devices_available = set_device_popdown_strings ();
}
unblock_changed_signals ();
if (devices_available) {
device_changed ();