13
0

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:
Tim Mayberry 2015-09-27 08:53:19 +10:00
parent f178152114
commit aa713fcd83

View File

@ -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 ()) {