Skip to content
Permalink
Browse files

Audio improvements from Max Horn, including a new CoreAudio driver fo…

…r MacOSX
  • Loading branch information
slouken committed Aug 21, 2004
1 parent 85d8792 commit f5d726c02b826d6dffabed35bddbd7ec3361f292
@@ -332,6 +332,7 @@ CheckDMEDIA()
],[
have_dmedia=yes
])
AC_MSG_RESULT($have_dmedia)
# Set up files for the audio library
if test x$have_dmedia = xyes; then
CFLAGS="$CFLAGS -DDMEDIA_SUPPORT"
@@ -489,6 +490,29 @@ 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()
@@ -2507,10 +2531,15 @@ case "$target" in
ARCH=macosx
CheckDummyVideo
CheckDiskAudio
CheckCoreAudio
CheckQUARTZ
CheckMacGL
CheckPTHREAD
CheckSIGACTION
# If either the audio or CD driver is used, add the AudioUnit framework
if test x$enable_audio = xyes -o x$enable_cdrom = xyes; then
SYSTEM_LIBS="$SYSTEM_LIBS -framework AudioToolbox -framework AudioUnit"
fi
# Set up files for the audio library
if test x$enable_audio = xyes; then
AUDIO_SUBDIRS="$AUDIO_SUBDIRS macrom"
@@ -2526,7 +2555,7 @@ case "$target" in
if test x$enable_cdrom = xyes; then
CDROM_SUBDIRS="$CDROM_SUBDIRS macosx"
CDROM_DRIVERS="$CDROM_DRIVERS macosx/libcdrom_macosx.la"
SYSTEM_LIBS="$SYSTEM_LIBS -framework AudioToolbox -framework AudioUnit -lstdc++"
SYSTEM_LIBS="$SYSTEM_LIBS -lstdc++"
fi
# Set up files for the thread library
if test x$enable_threads = xyes; then
@@ -2766,6 +2795,7 @@ src/audio/dma/Makefile
src/audio/dmedia/Makefile
src/audio/dsp/Makefile
src/audio/esd/Makefile
src/audio/macosx/Makefile
src/audio/macrom/Makefile
src/audio/mint/Makefile
src/audio/mme/Makefile
@@ -15,6 +15,7 @@ DIST_SUBDIRS = \
dmedia \
dsp \
esd \
macosx \
macrom \
mint \
mme \
@@ -77,6 +77,9 @@ static AudioBootStrap *bootstrap[] = {
#ifdef __BEOS__
&BAUDIO_bootstrap,
#endif
#ifdef COREAUDIO_SUPPORT
&COREAUDIO_bootstrap,
#endif
#if defined(macintosh) || TARGET_API_MAC_CARBON
&SNDMGR_bootstrap,
#endif
@@ -144,6 +144,9 @@ extern AudioBootStrap Paud_bootstrap;
#ifdef __BEOS__
extern AudioBootStrap BAUDIO_bootstrap;
#endif
#ifdef COREAUDIO_SUPPORT
extern AudioBootStrap COREAUDIO_bootstrap;
#endif
#if defined(macintosh) || TARGET_API_MAC_CARBON
extern AudioBootStrap SNDMGR_bootstrap;
#endif
@@ -0,0 +1,6 @@
Makefile.in
Makefile
.libs
*.o
*.lo
*.la
@@ -0,0 +1,9 @@

## Makefile.am for SDL using the Mac OS X CoreAudio driver

noinst_LTLIBRARIES = libaudio_macosx.la
libaudio_macosx_la_SOURCES = $(SRCS)

# The SDL audio driver sources
SRCS = SDL_coreaudio.c \
SDL_coreaudio.h

0 comments on commit f5d726c

Please sign in to comment.