Return meaningful error codes when PortaudioBackend fails to start
So they can be used to give a contextual error message in the GUI
This commit is contained in:
parent
f178152114
commit
aa713fcd83
@ -480,8 +480,14 @@ PortAudioBackend::_start (bool for_latency_measurement)
|
||||
switch (err) {
|
||||
case paNoError:
|
||||
break;
|
||||
case paBadIODeviceCombination:
|
||||
return DeviceConfigurationNotSupportedError;
|
||||
case paInvalidChannelCount:
|
||||
return ChannelCountNotSupportedError;
|
||||
case paInvalidSampleRate:
|
||||
return SampleRateNotSupportedError;
|
||||
default:
|
||||
return -1;
|
||||
return AudioDeviceOpenError;
|
||||
}
|
||||
|
||||
if (_n_outputs != _pcmio->n_playback_channels ()) {
|
||||
|
Loading…
Reference in New Issue
Block a user