From f5764fa2e4cb9d92a449e92d6207efb30e4ea218 Mon Sep 17 00:00:00 2001 From: Amar Takhar Date: Tue, 4 Mar 2008 00:59:02 +0000 Subject: [PATCH] Add support for OpenAL. Originally committed to SVN as r1880. --- aegisub/Makefile.am | 8 ++++++++ configure.in | 11 +++++++++++ 2 files changed, 19 insertions(+) diff --git a/aegisub/Makefile.am b/aegisub/Makefile.am index 12f5548df..61a3d927c 100644 --- a/aegisub/Makefile.am +++ b/aegisub/Makefile.am @@ -36,6 +36,14 @@ aegisub_LDFLAGS += @LIBPULSE_LIBS@ aegisub_LDADD += libaudio_pulseaudio.a endif +if HAVE_OPENAL +noinst_LIBRARIES += libaudio_openal.a +libaudio_openal_a_SOURCES = audio_player_openal.cpp +libaudio_openal_a_CFLAGS = @OPENAL_CFLAGS@ +aegisub_LDFLAGS += @OPENAL_LIBS@ +aegisub_LDADD += libaudio_openal.a +endif + if HAVE_FFMPEG noinst_LIBRARIES += libaudiovideo_ffmpeg.a libaudiovideo_ffmpeg_a_SOURCES = audio_provider_lavc.cpp lavc_file.cpp video_provider_lavc.cpp lavc_keyframes.cpp diff --git a/configure.in b/configure.in index deaf85aa1..d32e6162d 100644 --- a/configure.in +++ b/configure.in @@ -155,6 +155,16 @@ if test "$with_pulseaudio" == no; then AC_DEFINE(WITH_PULSEAUDIO, 1, [Enable PulseAudio support]) fi +AC_ARG_WITH(openal,[ --without-openal build without OpenAL audio provider. + (default: auto)], openal_disabled="(disabled)") +if test "x$with_openal" != xno; then + PKG_CHECK_MODULES(OPENAL, libpulse >= 0.0.8, [found_audio=yes; with_openal=yes], [with_openal=no]) +fi +AM_CONDITIONAL([HAVE_OPENAL], [test "$with_openal" != "no"]) +if test "$with_openal" == no; then + AC_DEFINE(WITH_OPENAL, 1, [Enable OpenAL support]) +fi + ################# # Video Providers @@ -526,6 +536,7 @@ Scripting Engines: Audio Providers: ALSA: $with_alsa $alsa_disabled + OpenAL: $with_openal $openal_disabled PortAudio: $with_portaudio $portaudio_disabled PulseAudio: $with_pulseaudio $pulseaudio_disabled