Fixed macosx audio initialization (passed wrong struct to CoreAudio).
authorRyan C. Gordon <icculus@icculus.org>
Sat, 02 Sep 2006 21:50:04 +0000
changeset 2017df06e6eb65c6
parent 2016 72fa74928062
child 2018 41a5fc1825b9
Fixed macosx audio initialization (passed wrong struct to CoreAudio).
src/audio/macosx/SDL_coreaudio.c
     1.1 --- a/src/audio/macosx/SDL_coreaudio.c	Sat Sep 02 21:19:00 2006 +0000
     1.2 +++ b/src/audio/macosx/SDL_coreaudio.c	Sat Sep 02 21:50:04 2006 +0000
     1.3 @@ -195,7 +195,7 @@
     1.4  
     1.5  #define CHECK_RESULT(msg) \
     1.6      if (result != noErr) { \
     1.7 -        SDL_SetError("Failed to start CoreAudio: " msg); \
     1.8 +        SDL_SetError("CoreAudio error (%s): %d", msg, (int) result); \
     1.9          return -1; \
    1.10      }
    1.11  
    1.12 @@ -281,7 +281,7 @@
    1.13                                        kAudioUnitProperty_StreamFormat,
    1.14                                        kAudioUnitScope_Input,
    1.15                                        0,
    1.16 -                                      &desc, sizeof (desc));
    1.17 +                                      &strdesc, sizeof (strdesc));
    1.18      CHECK_RESULT("AudioUnitSetProperty (kAudioUnitProperty_StreamFormat)")
    1.19          /* Set the audio callback */
    1.20          callback.inputProc = audioCallback;