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.
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 ();
}
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 ();
}