chiark / gitweb /
Missing initializers, unaccountably not spotted by lenny's GCC!
[disorder] / lib / coreaudio.c
index 6231877cdf474615c6ebb98f70b30f867fad3e71..8540faa3233613c8ebd140f835436bdcdc344277 100644 (file)
@@ -16,7 +16,7 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 /** @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)