chiark / gitweb /
Turns out that GetMacOSStatusErrorString() and
authorRichard Kettlewell <rjk@greenend.org.uk>
Sat, 28 Feb 2009 11:03:19 +0000 (11:03 +0000)
committerRichard Kettlewell <rjk@greenend.org.uk>
Sat, 28 Feb 2009 11:03:19 +0000 (11:03 +0000)
GetMacOSStatusCommentString() don't produce useful answers, at least
for sound-related errors.  Users will just have to put up with numeric
error codes.

Thanks so much, Apple.

lib/coreaudio.c

index 6231877cdf474615c6ebb98f70b30f867fad3e71..f6a8162995837b2a0e763df22b4538793268f16e 100644 (file)
@@ -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)