Unverified Commit 42b22187 authored by Yue Wang's avatar Yue Wang Committed by GitHub

[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).
parent cfe22502
...@@ -637,11 +637,8 @@ osx_output_set_device(OSXOutput *oo) ...@@ -637,11 +637,8 @@ osx_output_set_device(OSXOutput *oo)
} }
} }
if (i == numdevices) { if (i == numdevices) {
FormatWarning(osx_output_domain, throw FormatRuntimeError("Found no audio device with name '%s' ",
"Found no audio device with name '%s' "
"(will use default audio device)",
oo->device_name); oo->device_name);
return;
} }
status = AudioUnitSetProperty(oo->au, status = AudioUnitSetProperty(oo->au,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment