[Spice-commits] gtk/spice-pulse.c
Victor Toso de Carvalho
victortoso at kemper.freedesktop.org
Mon Mar 23 06:13:21 PDT 2015
gtk/spice-pulse.c | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
New commits:
commit 9ef68ecd1fd11dea626628417928cb7815182bb6
Author: Victor Toso <victortoso at redhat.com>
Date: Wed Mar 18 09:37:10 2015 +0100
audio: use stream functions for pulse source
The functions pa_context_set_source_output_mute/volume are specifically
to change source stream volume/mute.
I changed the warnings to be compatible to sink_input ones;
diff --git a/gtk/spice-pulse.c b/gtk/spice-pulse.c
index fc1662e..dd7f309 100644
--- a/gtk/spice-pulse.c
+++ b/gtk/spice-pulse.c
@@ -672,11 +672,11 @@ static void record_mute_changed(GObject *object, GParamSpec *pspec, gpointer dat
pa_stream_get_device_index(p->record.stream) == PA_INVALID_INDEX)
return;
- op = pa_context_set_source_mute_by_index(p->context,
- pa_stream_get_device_index(p->record.stream),
+ op = pa_context_set_source_output_mute(p->context,
+ pa_stream_get_index(p->record.stream),
mute, NULL, NULL);
if (!op)
- g_warning("set_source_mute() failed: %s",
+ g_warning("set_source_output_mute() failed: %s",
pa_strerror(pa_context_errno(p->context)));
else
pa_operation_unref(op);
@@ -708,12 +708,11 @@ static void record_volume_changed(GObject *object, GParamSpec *pspec, gpointer d
pa_stream_get_device_index(p->record.stream) == PA_INVALID_INDEX)
return;
- /* FIXME: use the upcoming "set_source_output_volume" */
- op = pa_context_set_source_volume_by_index(p->context,
- pa_stream_get_device_index(p->record.stream),
+ op = pa_context_set_source_output_volume(p->context,
+ pa_stream_get_index(p->record.stream),
&v, NULL, NULL);
if (!op)
- g_warning("set_source_volume() failed: %s",
+ g_warning("set_source_output_volume() failed: %s",
pa_strerror(pa_context_errno(p->context)));
else
pa_operation_unref(op);
More information about the Spice-commits
mailing list