X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~mdw/git/disorder/blobdiff_plain/ca6b4a12640792d416b9fcbeb4baa8a3b84285ff..561d077df8d0494aeeaf3f30d847f489336cbfd6:/lib/coreaudio.c diff --git a/lib/coreaudio.c b/lib/coreaudio.c index 6231877..8540faa 100644 --- a/lib/coreaudio.c +++ b/lib/coreaudio.c @@ -16,7 +16,7 @@ * along with this program. If not, see . */ /** @file lib/coreaudio.c - * @brief Support for @ref BACKEND_COREAUDIO + * @brief Support for Apple Core Audio */ #include "common.h" @@ -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 */ @@ -68,9 +65,9 @@ static AudioDeviceID coreaudio_use_default(void) { /** @brief Find a device by some string * @param selector Selector for property to look for - * @param description Property description * @param devs List of device IDs * @param ndevs Number of device IDs in @p devs + * @param dev Desired device name * @param resultp Where to put device ID * @return 1 if found, 0 if not found */ @@ -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)