diff src/audio/macosx/SDL_coreaudio.c @ 2017:df06e6eb65c6

Fixed macosx audio initialization (passed wrong struct to CoreAudio).
author Ryan C. Gordon <icculus@icculus.org>
date Sat, 02 Sep 2006 21:50:04 +0000
parents 72fa74928062
children adf732f1f016
line wrap: on
line diff
--- a/src/audio/macosx/SDL_coreaudio.c	Sat Sep 02 21:19:00 2006 +0000
+++ b/src/audio/macosx/SDL_coreaudio.c	Sat Sep 02 21:50:04 2006 +0000
@@ -195,7 +195,7 @@
 
 #define CHECK_RESULT(msg) \
     if (result != noErr) { \
-        SDL_SetError("Failed to start CoreAudio: " msg); \
+        SDL_SetError("CoreAudio error (%s): %d", msg, (int) result); \
         return -1; \
     }
 
@@ -281,7 +281,7 @@
                                       kAudioUnitProperty_StreamFormat,
                                       kAudioUnitScope_Input,
                                       0,
-                                      &desc, sizeof (desc));
+                                      &strdesc, sizeof (strdesc));
     CHECK_RESULT("AudioUnitSetProperty (kAudioUnitProperty_StreamFormat)")
         /* Set the audio callback */
         callback.inputProc = audioCallback;