CoreAudio driver works on Mac OSX 10.1
authorSam Lantinga <slouken@libsdl.org>
Sat, 21 Aug 2004 03:21:44 +0000
changeset 93684f930aebaeb
parent 935 f8d5ddc7aef1
child 937 1e6366bde299
CoreAudio driver works on Mac OSX 10.1
configure.in
src/audio/SDL_audio.c
src/audio/SDL_sysaudio.h
src/audio/macosx/SDL_coreaudio.c
     1.1 --- a/configure.in	Sat Aug 21 02:06:30 2004 +0000
     1.2 +++ b/configure.in	Sat Aug 21 03:21:44 2004 +0000
     1.3 @@ -490,29 +490,6 @@
     1.4      fi
     1.5  }
     1.6  
     1.7 -dnl Check whether we want to use CoreAudio
     1.8 -CheckCoreAudio()
     1.9 -{
    1.10 -    if test x$enable_audio = xyes; then
    1.11 -        AC_MSG_CHECKING(for CoreAudio audio support)
    1.12 -        have_coreaudio=no
    1.13 -        AC_TRY_COMPILE([
    1.14 -          #include <AudioUnit/AudioUnit.h>
    1.15 -        ],[
    1.16 -          AudioUnitInputCallback callback;
    1.17 -        ],[
    1.18 -        have_coreaudio=yes
    1.19 -        ])
    1.20 -        AC_MSG_RESULT($have_coreaudio)
    1.21 -        # Set up files for the audio library
    1.22 -        if test x$have_coreaudio = xyes; then
    1.23 -            CFLAGS="$CFLAGS -DCOREAUDIO_SUPPORT"
    1.24 -            AUDIO_SUBDIRS="$AUDIO_SUBDIRS macosx"
    1.25 -            AUDIO_DRIVERS="$AUDIO_DRIVERS macosx/libaudio_macosx.la"
    1.26 -        fi
    1.27 -    fi
    1.28 -}
    1.29 -
    1.30  dnl See if we can use x86 assembly blitters
    1.31  # NASM is available from: http://nasm.octium.net/
    1.32  CheckNASM()
    1.33 @@ -2531,7 +2508,6 @@
    1.34          ARCH=macosx
    1.35          CheckDummyVideo
    1.36          CheckDiskAudio
    1.37 -        CheckCoreAudio
    1.38          CheckQUARTZ
    1.39          CheckMacGL
    1.40          CheckPTHREAD
    1.41 @@ -2542,6 +2518,8 @@
    1.42          fi
    1.43          # Set up files for the audio library
    1.44          if test x$enable_audio = xyes; then
    1.45 +            AUDIO_SUBDIRS="$AUDIO_SUBDIRS macosx"
    1.46 +            AUDIO_DRIVERS="$AUDIO_DRIVERS macosx/libaudio_macosx.la"
    1.47              AUDIO_SUBDIRS="$AUDIO_SUBDIRS macrom"
    1.48              AUDIO_DRIVERS="$AUDIO_DRIVERS macrom/libaudio_macrom.la"
    1.49          fi
     2.1 --- a/src/audio/SDL_audio.c	Sat Aug 21 02:06:30 2004 +0000
     2.2 +++ b/src/audio/SDL_audio.c	Sat Aug 21 03:21:44 2004 +0000
     2.3 @@ -77,7 +77,7 @@
     2.4  #ifdef __BEOS__
     2.5  	&BAUDIO_bootstrap,
     2.6  #endif
     2.7 -#ifdef COREAUDIO_SUPPORT
     2.8 +#ifdef MACOSX
     2.9  	&COREAUDIO_bootstrap,
    2.10  #endif
    2.11  #if defined(macintosh) || TARGET_API_MAC_CARBON
     3.1 --- a/src/audio/SDL_sysaudio.h	Sat Aug 21 02:06:30 2004 +0000
     3.2 +++ b/src/audio/SDL_sysaudio.h	Sat Aug 21 03:21:44 2004 +0000
     3.3 @@ -144,7 +144,7 @@
     3.4  #ifdef __BEOS__
     3.5  extern AudioBootStrap BAUDIO_bootstrap;
     3.6  #endif
     3.7 -#ifdef COREAUDIO_SUPPORT
     3.8 +#ifdef MACOSX
     3.9  extern AudioBootStrap COREAUDIO_bootstrap;
    3.10  #endif
    3.11  #if defined(macintosh) || TARGET_API_MAC_CARBON
     4.1 --- a/src/audio/macosx/SDL_coreaudio.c	Sat Aug 21 02:06:30 2004 +0000
     4.2 +++ b/src/audio/macosx/SDL_coreaudio.c	Sat Aug 21 03:21:44 2004 +0000
     4.3 @@ -165,7 +165,7 @@
     4.4  void Core_CloseAudio(_THIS)
     4.5  {
     4.6      OSStatus result;
     4.7 -    AudioUnitInputCallback callback;
     4.8 +    struct AudioUnitInputCallback callback;
     4.9  
    4.10      /* stop processing the audio unit */
    4.11      result = AudioOutputUnitStop (outputAudioUnit);
    4.12 @@ -209,7 +209,7 @@
    4.13      OSStatus result = noErr;
    4.14      Component comp;
    4.15      ComponentDescription desc;
    4.16 -    AudioUnitInputCallback callback;
    4.17 +    struct AudioUnitInputCallback callback;
    4.18      AudioStreamBasicDescription requestedDesc;
    4.19  
    4.20      /* Setup a AudioStreamBasicDescription with the requested format */