summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorYue Wang <Wang-Yue@users.noreply.github.com>2019-01-25 19:50:27 -0800
committerGitHub <noreply@github.com>2019-01-25 19:50:27 -0800
commit42b22187c89a0032b4aff1722ef01f3aaedffcec (patch)
treee56888a8c3c9cc2ffa79c9ca0356f6b7cd54bb6e /src
parentcfe22502ab00a09b77a179b9f125c01ad183f995 (diff)
[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).
Diffstat (limited to 'src')
-rw-r--r--src/output/plugins/OSXOutputPlugin.cxx5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/output/plugins/OSXOutputPlugin.cxx b/src/output/plugins/OSXOutputPlugin.cxx
index b39d21a35..db7a98e28 100644
--- a/src/output/plugins/OSXOutputPlugin.cxx
+++ b/src/output/plugins/OSXOutputPlugin.cxx
@@ -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,