diff options
author | Victor Toso <victortoso@redhat.com> | 2015-03-31 18:54:00 +0200 |
---|---|---|
committer | Victor Toso <victortoso@redhat.com> | 2015-04-01 10:02:09 +0200 |
commit | 0641a894663be5174df02350710d9346426f04a2 (patch) | |
tree | f7fdf16b2fa814016ede2f647354d5a69315bfca /gtk/spice-pulse.c | |
parent | 11d9fd16005b4db8dc2682b83077afd7710634ee (diff) |
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.
Diffstat (limited to 'gtk/spice-pulse.c')
-rw-r--r-- | gtk/spice-pulse.c | 10 |
1 files changed, 10 insertions, 0 deletions
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", |