From 1f3d2413174c3187de3fd8701d3ba26a0d1e4489 Mon Sep 17 00:00:00 2001 Message-Id: <1f3d2413174c3187de3fd8701d3ba26a0d1e4489.1714560100.git.mdw@distorted.org.uk> From: Mark Wooding Date: Sat, 28 Feb 2009 11:03:19 +0000 Subject: [PATCH] Turns out that GetMacOSStatusErrorString() and GetMacOSStatusCommentString() don't produce useful answers, at least for sound-related errors. Users will just have to put up with numeric error codes. Organization: Straylight/Edgeware From: Richard Kettlewell Thanks so much, Apple. --- lib/coreaudio.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/lib/coreaudio.c b/lib/coreaudio.c index 6231877..f6a8162 100644 --- a/lib/coreaudio.c +++ b/lib/coreaudio.c @@ -41,10 +41,7 @@ void coreaudio_fatal(OSStatus err, const char *fmt, ...) { byte_vasprintf(&msg, fmt, ap); va_end(ap); - disorder_fatal(0, "%s: error %d (%s, %s)", - msg, (int)err, - GetMacOSStatusErrorString(err), - GetMacOSStatusCommentString(err)); + disorder_fatal(0, "%s: error %u", msg, (unsigned)err); } /** @brief Return the default device ID */ @@ -147,7 +144,7 @@ AudioDeviceID coreaudio_getdevice(const char *name) { if(!ndevs) disorder_fatal(0, "no sound devices found"); /* Try looking up by UID first */ - found = coreaudio_find_device(kAudioDevicePropertyDeviceUID, //"UID", + found = coreaudio_find_device(-1*kAudioDevicePropertyDeviceUID, //"UID", devs, ndevs, dev, &adid); /* Failing that try looking up by name */ if(!found) -- [mdw]