Commit 0ac2cf18 authored by Sam Lantinga's avatar Sam Lantinga

CoreAudio driver works on Mac OSX 10.1

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40937
parent 35c8da7a
...@@ -490,29 +490,6 @@ CheckAtariAudio() ...@@ -490,29 +490,6 @@ CheckAtariAudio()
fi 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 dnl See if we can use x86 assembly blitters
# NASM is available from: http://nasm.octium.net/ # NASM is available from: http://nasm.octium.net/
CheckNASM() CheckNASM()
...@@ -2531,7 +2508,6 @@ case "$target" in ...@@ -2531,7 +2508,6 @@ case "$target" in
ARCH=macosx ARCH=macosx
CheckDummyVideo CheckDummyVideo
CheckDiskAudio CheckDiskAudio
CheckCoreAudio
CheckQUARTZ CheckQUARTZ
CheckMacGL CheckMacGL
CheckPTHREAD CheckPTHREAD
...@@ -2542,6 +2518,8 @@ case "$target" in ...@@ -2542,6 +2518,8 @@ case "$target" in
fi fi
# Set up files for the audio library # Set up files for the audio library
if test x$enable_audio = xyes; then 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_SUBDIRS="$AUDIO_SUBDIRS macrom"
AUDIO_DRIVERS="$AUDIO_DRIVERS macrom/libaudio_macrom.la" AUDIO_DRIVERS="$AUDIO_DRIVERS macrom/libaudio_macrom.la"
fi fi
......
...@@ -77,7 +77,7 @@ static AudioBootStrap *bootstrap[] = { ...@@ -77,7 +77,7 @@ static AudioBootStrap *bootstrap[] = {
#ifdef __BEOS__ #ifdef __BEOS__
&BAUDIO_bootstrap, &BAUDIO_bootstrap,
#endif #endif
#ifdef COREAUDIO_SUPPORT #ifdef MACOSX
&COREAUDIO_bootstrap, &COREAUDIO_bootstrap,
#endif #endif
#if defined(macintosh) || TARGET_API_MAC_CARBON #if defined(macintosh) || TARGET_API_MAC_CARBON
......
...@@ -144,7 +144,7 @@ extern AudioBootStrap Paud_bootstrap; ...@@ -144,7 +144,7 @@ extern AudioBootStrap Paud_bootstrap;
#ifdef __BEOS__ #ifdef __BEOS__
extern AudioBootStrap BAUDIO_bootstrap; extern AudioBootStrap BAUDIO_bootstrap;
#endif #endif
#ifdef COREAUDIO_SUPPORT #ifdef MACOSX
extern AudioBootStrap COREAUDIO_bootstrap; extern AudioBootStrap COREAUDIO_bootstrap;
#endif #endif
#if defined(macintosh) || TARGET_API_MAC_CARBON #if defined(macintosh) || TARGET_API_MAC_CARBON
......
...@@ -165,7 +165,7 @@ Uint8 *Core_GetAudioBuf(_THIS) ...@@ -165,7 +165,7 @@ Uint8 *Core_GetAudioBuf(_THIS)
void Core_CloseAudio(_THIS) void Core_CloseAudio(_THIS)
{ {
OSStatus result; OSStatus result;
AudioUnitInputCallback callback; struct AudioUnitInputCallback callback;
/* stop processing the audio unit */ /* stop processing the audio unit */
result = AudioOutputUnitStop (outputAudioUnit); result = AudioOutputUnitStop (outputAudioUnit);
...@@ -209,7 +209,7 @@ int Core_OpenAudio(_THIS, SDL_AudioSpec *spec) ...@@ -209,7 +209,7 @@ int Core_OpenAudio(_THIS, SDL_AudioSpec *spec)
OSStatus result = noErr; OSStatus result = noErr;
Component comp; Component comp;
ComponentDescription desc; ComponentDescription desc;
AudioUnitInputCallback callback; struct AudioUnitInputCallback callback;
AudioStreamBasicDescription requestedDesc; AudioStreamBasicDescription requestedDesc;
/* Setup a AudioStreamBasicDescription with the requested format */ /* Setup a AudioStreamBasicDescription with the requested format */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment