Fixed macosx audio initialization (passed wrong struct to CoreAudio).
authorRyan C. Gordon <icculus@icculus.org>
Sat, 02 Sep 2006 21:50:04 +0000
changeset 2017 df06e6eb65c6
parent 2016 72fa74928062
child 2018 41a5fc1825b9
Fixed macosx audio initialization (passed wrong struct to CoreAudio).
src/audio/macosx/SDL_coreaudio.c
--- 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;