[OSXOutput] Throw an error when device not found
Currently it falls back to system default device (either internal speaker or headphone) when device not found. I believe it is a better to fail in this case, to make it better aligned with platforms (such as alsa).
This commit is contained in:
parent
cfe22502ab
commit
42b22187c8
|
@ -637,11 +637,8 @@ osx_output_set_device(OSXOutput *oo)
|
|||
}
|
||||
}
|
||||
if (i == numdevices) {
|
||||
FormatWarning(osx_output_domain,
|
||||
"Found no audio device with name '%s' "
|
||||
"(will use default audio device)",
|
||||
throw FormatRuntimeError("Found no audio device with name '%s' ",
|
||||
oo->device_name);
|
||||
return;
|
||||
}
|
||||
|
||||
status = AudioUnitSetProperty(oo->au,
|
||||
|
|
Loading…
Reference in New Issue