[prev in list] [next in list] [prev in thread] [next in thread] 

List:       xine-devel
Subject:    [xine-devel] [PATCH] Replace configure test for PulseAudio version
From:       Matthias Ringwald <mringwal () inf ! ethz ! ch>
Date:       2008-10-17 9:44:23
Message-ID: 0970a2590ae762e35c1e.1224236663 () vs15 ! inf ! ethz ! ch
[Download RAW message or body]

# HG changeset patch
# User Matthias Ringwald <mringwal@inf.ethz.ch>
# Date 1224236623 -7200
# Node ID 0970a2590ae762e35c1e61ec0c0fe7feede59f2d
# Parent  e895d206a0a8d79b353cb0d40c2095141cf869de
Replace configure test for PulseAudio version by cpp tess

Version 0.9.6 has PA_PROTOCOL_VERSION 10, version 0.9.7 has 11.
This simplifies configure and limits the knowledge about PA versions to the
audio output plug-in.

This time, the patch includes configure.ac, too.

diff -r e895d206a0a8 -r 0970a2590ae7 configure.ac
--- a/configure.ac	Thu Oct 16 11:33:52 2008 +0200
+++ b/configure.ac	Fri Oct 17 11:43:43 2008 +0200
@@ -1081,17 +1081,8 @@
 
 if test "x$with_pulseaudio" != "xno"; then
    PKG_CHECK_MODULES([PULSEAUDIO], [libpulse], [have_pulseaudio="yes"], [have_pulseaudio="no"])
-   if test x"$have_pulseaudio" = xyes; then
-      AC_MSG_CHECKING([for pulseaudio >= 0.9.7])
-      PKG_CHECK_EXISTS([libpulse >= 0.9.7],
-        [have_pulseaudio_0_9_7="yes"],
-        [have_pulseaudio_0_9_7="no"])
-      AC_MSG_RESULT([$have_pulseaudio_0_9_7])
-      if test x"$have_pulseaudio_0_9_7" = xyes; then
-         AC_DEFINE([HAVE_PULSEAUDIO_0_9_7], 1, [define this if you have pulseaudio >= 0.9.7])
-      fi
-   fi
 fi
+
 AM_CONDITIONAL(HAVE_PULSEAUDIO, [test "x$have_pulseaudio" = x"yes"])
 AC_SUBST([PULSEAUDIO_CFLAGS])
 AC_SUBST([PULSEAUDIO_LIBS])
diff -r e895d206a0a8 -r 0970a2590ae7 src/audio_out/audio_pulse_out.c
--- a/src/audio_out/audio_pulse_out.c	Thu Oct 16 11:33:52 2008 +0200
+++ b/src/audio_out/audio_pulse_out.c	Fri Oct 17 11:43:43 2008 +0200
@@ -218,7 +218,8 @@
 
   this->cvolume = info->volume;
   this->swvolume = pa_cvolume_avg(&info->volume);
-#ifdef HAVE_PULSEAUDIO_0_9_7
+#if PA_PROTOCOL_VERSION >= 11
+  /* PulseAudio 0.9.7 and newer */
   this->muted = info->mute;
 #else
   this->muted = pa_cvolume_is_muted (&this->cvolume);
@@ -665,7 +666,8 @@
 
       this->muted = value;
 
-#ifdef HAVE_PULSEAUDIO_0_9_7
+#if PA_PROTOCOL_VERSION >= 11
+      /* PulseAudio 0.9.7 and newer */
       o = pa_context_set_sink_input_mute(this->context, pa_stream_get_index(this->stream),
                                            value, __xine_pa_context_success_callback, this);
 #else

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
xine-devel mailing list
xine-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xine-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic