Skip to content

Commit

Permalink
CoreAudio driver works on Mac OSX 10.1
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Aug 21, 2004
1 parent f5d726c commit 43cbc39
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 28 deletions.
26 changes: 2 additions & 24 deletions configure.in
Expand Up @@ -490,29 +490,6 @@ CheckAtariAudio()
fi
}

dnl Check whether we want to use CoreAudio
CheckCoreAudio()
{
if test x$enable_audio = xyes; then
AC_MSG_CHECKING(for CoreAudio audio support)
have_coreaudio=no
AC_TRY_COMPILE([
#include <AudioUnit/AudioUnit.h>
],[
AudioUnitInputCallback callback;
],[
have_coreaudio=yes
])
AC_MSG_RESULT($have_coreaudio)
# Set up files for the audio library
if test x$have_coreaudio = xyes; then
CFLAGS="$CFLAGS -DCOREAUDIO_SUPPORT"
AUDIO_SUBDIRS="$AUDIO_SUBDIRS macosx"
AUDIO_DRIVERS="$AUDIO_DRIVERS macosx/libaudio_macosx.la"
fi
fi
}

dnl See if we can use x86 assembly blitters
# NASM is available from: http://nasm.octium.net/
CheckNASM()
Expand Down Expand Up @@ -2531,7 +2508,6 @@ case "$target" in
ARCH=macosx
CheckDummyVideo
CheckDiskAudio
CheckCoreAudio
CheckQUARTZ
CheckMacGL
CheckPTHREAD
Expand All @@ -2542,6 +2518,8 @@ case "$target" in
fi
# Set up files for the audio library
if test x$enable_audio = xyes; then
AUDIO_SUBDIRS="$AUDIO_SUBDIRS macosx"
AUDIO_DRIVERS="$AUDIO_DRIVERS macosx/libaudio_macosx.la"
AUDIO_SUBDIRS="$AUDIO_SUBDIRS macrom"
AUDIO_DRIVERS="$AUDIO_DRIVERS macrom/libaudio_macrom.la"
fi
Expand Down
2 changes: 1 addition & 1 deletion src/audio/SDL_audio.c
Expand Up @@ -77,7 +77,7 @@ static AudioBootStrap *bootstrap[] = {
#ifdef __BEOS__
&BAUDIO_bootstrap,
#endif
#ifdef COREAUDIO_SUPPORT
#ifdef MACOSX
&COREAUDIO_bootstrap,
#endif
#if defined(macintosh) || TARGET_API_MAC_CARBON
Expand Down
2 changes: 1 addition & 1 deletion src/audio/SDL_sysaudio.h
Expand Up @@ -144,7 +144,7 @@ extern AudioBootStrap Paud_bootstrap;
#ifdef __BEOS__
extern AudioBootStrap BAUDIO_bootstrap;
#endif
#ifdef COREAUDIO_SUPPORT
#ifdef MACOSX
extern AudioBootStrap COREAUDIO_bootstrap;
#endif
#if defined(macintosh) || TARGET_API_MAC_CARBON
Expand Down
4 changes: 2 additions & 2 deletions src/audio/macosx/SDL_coreaudio.c
Expand Up @@ -165,7 +165,7 @@ Uint8 *Core_GetAudioBuf(_THIS)
void Core_CloseAudio(_THIS)
{
OSStatus result;
AudioUnitInputCallback callback;
struct AudioUnitInputCallback callback;

/* stop processing the audio unit */
result = AudioOutputUnitStop (outputAudioUnit);
Expand Down Expand Up @@ -209,7 +209,7 @@ int Core_OpenAudio(_THIS, SDL_AudioSpec *spec)
OSStatus result = noErr;
Component comp;
ComponentDescription desc;
AudioUnitInputCallback callback;
struct AudioUnitInputCallback callback;
AudioStreamBasicDescription requestedDesc;

/* Setup a AudioStreamBasicDescription with the requested format */
Expand Down

0 comments on commit 43cbc39

Please sign in to comment.