[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) {
|
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,
|
||||||
|
|
Loading…
Reference in New Issue