Skip to content
Permalink
Browse files

Updated ALSA audio support for ALSA 0.9

  • Loading branch information
slouken committed Apr 15, 2002
1 parent 7c1fa60 commit 9f2e228a6c4e2407e2196ddcdde6fbd5264ccf80
Showing with 168 additions and 368 deletions.
  1. +14 −3 configure.in
  2. +145 −347 src/audio/alsa/SDL_alsa_audio.c
  3. +7 −18 src/audio/alsa/SDL_alsa_audio.h
  4. +1 −0 src/audio/dma/SDL_dmaaudio.c
  5. +1 −0 src/audio/dsp/SDL_dspaudio.c
@@ -269,14 +269,25 @@ CheckALSA()
[ --enable-alsa support the ALSA audio API [default=yes]],
, enable_alsa=yes)
if test x$enable_audio = xyes -a x$enable_alsa = xyes; then
AC_MSG_CHECKING(for ALSA audio support)
have_alsa=no
AC_CHECK_HEADER(sys/asoundlib.h, have_alsa_hdr=yes)
AC_CHECK_LIB(asound, snd_pcm_open, have_alsa_lib=yes)
if test x$have_alsa_hdr = xyes -a x$have_alsa_lib = xyes; then
AC_TRY_COMPILE([
#include <alsa/asoundlib.h>
],[
#if SND_LIB_VERSION < ((0<<16)|(9<<8)|0)
#error Your version of ALSA is too old
#endif
snd_pcm_t *pcm_handle;
],[
AC_CHECK_LIB(asound, snd_pcm_open, have_alsa=yes)
])
if test x$have_alsa = xyes; then
CFLAGS="$CFLAGS -DALSA_SUPPORT"
SYSTEM_LIBS="$SYSTEM_LIBS -lasound"
AUDIO_SUBDIRS="$AUDIO_SUBDIRS alsa"
AUDIO_DRIVERS="$AUDIO_DRIVERS alsa/libaudio_alsa.la"
else
AC_MSG_RESULT($have_alsa)
fi
fi
}

0 comments on commit 9f2e228

Please sign in to comment.