Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Date: Thu, 01 Jan 2009 21:32:12 +0100
Browse files Browse the repository at this point in the history
From: Couriersud
Subject: Fusionsound audio driver

attached is a diff containing a audio driver for the FusionSound
library. This sound library is closely related to DirectFB and uses the
same transport (fusion) as DirectFB when running applications "remote",
i.e. over the network. As such, it natively redirects sound where
DirectFB redirects video. This may be handy for everyone using SDL over
DirectFB.
  • Loading branch information
slouken committed Jan 1, 2009
1 parent 3f59bae commit 3efb034
Show file tree
Hide file tree
Showing 5 changed files with 452 additions and 0 deletions.
51 changes: 51 additions & 0 deletions configure.in
Expand Up @@ -1349,6 +1349,56 @@ AC_HELP_STRING([--enable-video-directfb], [use DirectFB video driver [[default=n
fi
}

dnl Find FusionSound
CheckFusionSound()
{
AC_ARG_ENABLE(fusionsound,
AC_HELP_STRING([--enable-fusionsound], [use FusionSound audio driver [[default=no]]]),
, enable_fusionsound=no)
if test x$enable_audio = xyes -a x$enable_fusionsound = xyes; then
fusionsound=no

FUSIONSOUND_REQUIRED_VERSION=1.1.1

AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
AC_MSG_CHECKING(for FusionSound $FUSIONSOUND_REQUIRED_VERSION support)
if test x$PKG_CONFIG != xno; then
if $PKG_CONFIG --atleast-pkgconfig-version 0.7 && $PKG_CONFIG --atleast-version $FUSIONSOUND_REQUIRED_VERSION fusionsound; then
FUSIONSOUND_CFLAGS=`$PKG_CONFIG --cflags fusionsound`
FUSIONSOUND_LIBS=`$PKG_CONFIG --libs fusionsound`
fusionsound=yes
fi
fi
AC_MSG_RESULT($fusionsound)

if test x$fusionsound = xyes; then
AC_DEFINE(SDL_AUDIO_DRIVER_FUSIONSOUND)
SOURCES="$SOURCES $srcdir/src/audio/fusionsound/*.c"
EXTRA_CFLAGS="$EXTRA_CFLAGS $FUSIONSOUND_CFLAGS"

AC_ARG_ENABLE(fusionsound-shared,
AC_HELP_STRING([--enable-fusionsound-shared], [dynamically load fusionsound audio support [[default=yes]]]),
, enable_fusionsound_shared=yes)
fusionsound_shared=no
AC_MSG_CHECKING(for FusionSound dynamic loading support)
if test x$have_loadso != xyes && \
test x$enable_fusionsound_shared = xyes; then
AC_MSG_WARN([You must have SDL_LoadObject() support for dynamic fusionsound loading])
fi
if test x$have_loadso = xyes && \
test x$enable_fusionsound_shared = xyes; then
AC_DEFINE_UNQUOTED(SDL_AUDIO_DRIVER_FUSIONSOUND_DYNAMIC, "libfusionsound.so")
fusionsound_shared=yes
else
EXTRA_LDFLAGS="$EXTRA_LDFLAGS $FUSIONSOUND_LIBS"
fi
AC_MSG_RESULT($fusionsound_shared)

have_audio=yes
fi
fi
}

dnl See if we're running on PlayStation 2 hardware
CheckPS2GS()
{
Expand Down Expand Up @@ -2207,6 +2257,7 @@ case "$host" in
CheckNANOX
CheckFBCON
CheckDirectFB
CheckFusionSound
CheckPS2GS
CheckSVGA
CheckVGL
Expand Down
2 changes: 2 additions & 0 deletions include/SDL_config.h.in
Expand Up @@ -185,6 +185,8 @@
#undef SDL_AUDIO_DRIVER_SNDMGR
#undef SDL_AUDIO_DRIVER_SUNAUDIO
#undef SDL_AUDIO_DRIVER_WINWAVEOUT
#undef SDL_AUDIO_DRIVER_FUSIONSOUND
#undef SDL_AUDIO_DRIVER_FUSIONSOUND_DYNAMIC

/* Enable various cdrom drivers */
#undef SDL_CDROM_AIX
Expand Down
4 changes: 4 additions & 0 deletions src/audio/SDL_audio.c
Expand Up @@ -72,6 +72,7 @@ extern AudioBootStrap DCAUD_bootstrap;
extern AudioBootStrap MMEAUDIO_bootstrap;
extern AudioBootStrap DART_bootstrap;
extern AudioBootStrap NDSAUD_bootstrap;
extern AudioBootStrap FUSIONSOUND_bootstrap;


/* Available audio drivers */
Expand Down Expand Up @@ -152,6 +153,9 @@ static AudioBootStrap *bootstrap[] = {
#endif
#if SDL_AUDIO_DRIVER_NDS
&NDSAUD_bootstrap,
#endif
#if SDL_AUDIO_DRIVER_FUSIONSOUND
&FUSIONSOUND_bootstrap,
#endif
NULL
};
Expand Down

0 comments on commit 3efb034

Please sign in to comment.