From 8d540737b9aa34ef03a8000cfe88473ec8a32563 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 28 May 2020 15:02:14 +0200 Subject: [PATCH] output/osx: silently ignore some errors in osx_output_set_device() --- src/output/plugins/OSXOutputPlugin.cxx | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/output/plugins/OSXOutputPlugin.cxx b/src/output/plugins/OSXOutputPlugin.cxx index d21c8f006..7dec3b2d3 100644 --- a/src/output/plugins/OSXOutputPlugin.cxx +++ b/src/output/plugins/OSXOutputPlugin.cxx @@ -673,20 +673,14 @@ osx_output_set_device(OSXOutput *oo) status = AudioObjectGetPropertyData(deviceids[i], &aopa_name, 0, nullptr, &size, &cfname); - if (status != noErr) { - char errormsg[1024]; - osx_os_status_to_cstring(status, errormsg, sizeof(errormsg)); - throw FormatRuntimeError("Unable to determine OS X device name " - "(device %u): %s", - (unsigned int) deviceids[i], - errormsg); - } + if (status != noErr) + continue; const Apple::StringRef cfname_(cfname); char name[256]; if (!cfname_.GetCString(name, sizeof(name))) - throw std::runtime_error("Unable to convert device name from CFStringRef to char*"); + continue; if (StringIsEqual(oo->device_name, name)) { FormatDebug(osx_output_domain,