Fix to ensure there are always sample rates and buffer sizes in the dropdown
This can happen if both input and output devices are set to None for instance on backends that report no supported SR or buffer size for the None device.
This commit is contained in:
parent
c80e4c04c5
commit
22acbc1cee
@ -1172,6 +1172,11 @@ EngineControl::set_samplerate_popdown_strings ()
|
||||
|
||||
if (_have_control) {
|
||||
sr = get_sample_rates_for_all_devices ();
|
||||
// currently possible if both devices are set to "None" and the backend
|
||||
// returns no supported rates for both devices
|
||||
if (sr.empty()) {
|
||||
sr = get_default_sample_rates ();
|
||||
}
|
||||
} else {
|
||||
sr = get_default_sample_rates ();
|
||||
}
|
||||
@ -1257,6 +1262,11 @@ EngineControl::set_buffersize_popdown_strings ()
|
||||
|
||||
if (_have_control) {
|
||||
bs = get_buffer_sizes_for_all_devices ();
|
||||
// currently possible if both devices are set to "None" and the backend
|
||||
// returns no supported sizes for both devices
|
||||
if (bs.empty()) {
|
||||
bs = get_default_buffer_sizes ();
|
||||
}
|
||||
} else if (backend->can_change_buffer_size_when_running()) {
|
||||
bs = get_default_buffer_sizes ();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user