[Spice-commits] gtk/spice-pulse.c

Victor Toso de Carvalho victortoso at kemper.freedesktop.org
Wed Apr 1 01:02:36 PDT 2015


 gtk/spice-pulse.c |   10 ++++++++++
 1 file changed, 10 insertions(+)

New commits:
commit 0641a894663be5174df02350710d9346426f04a2
Author: Victor Toso <victortoso at redhat.com>
Date:   Tue Mar 31 18:54:00 2015 +0200

    audio: keep compatibility with old pulse version
    
    The commit 9ef68ecd1fd11dea626628 breaks compatibility with old versions
    of libpulse as the source_output functions were available from version
    1.0.0 onwards.

diff --git a/gtk/spice-pulse.c b/gtk/spice-pulse.c
index dd7f309..c583032 100644
--- a/gtk/spice-pulse.c
+++ b/gtk/spice-pulse.c
@@ -672,8 +672,13 @@ static void record_mute_changed(GObject *object, GParamSpec *pspec, gpointer dat
         pa_stream_get_device_index(p->record.stream) == PA_INVALID_INDEX)
         return;
 
+#if PA_CHECK_VERSION(1,0,0)
     op = pa_context_set_source_output_mute(p->context,
         pa_stream_get_index(p->record.stream),
+#else
+    op = pa_context_set_source_mute_by_index(p->context,
+        pa_stream_get_device_index(p->record.stream),
+#endif
         mute, NULL, NULL);
     if (!op)
         g_warning("set_source_output_mute() failed: %s",
@@ -708,8 +713,13 @@ static void record_volume_changed(GObject *object, GParamSpec *pspec, gpointer d
         pa_stream_get_device_index(p->record.stream) == PA_INVALID_INDEX)
         return;
 
+#if PA_CHECK_VERSION(1,0,0)
     op = pa_context_set_source_output_volume(p->context,
         pa_stream_get_index(p->record.stream),
+#else
+    op = pa_context_set_source_volume_by_index(p->context,
+        pa_stream_get_device_index(p->record.stream),
+#endif
         &v, NULL, NULL);
     if (!op)
         g_warning("set_source_output_volume() failed: %s",


More information about the Spice-commits mailing list