From 8263f9aed8c1c66cfe7a7749a4d78c096165acd3 Mon Sep 17 00:00:00 2001 From: Conor Curran Date: Thu, 17 Feb 2011 19:58:09 +0000 Subject: enough for one day --- src/pulseaudio-mgr.c | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) (limited to 'src/pulseaudio-mgr.c') diff --git a/src/pulseaudio-mgr.c b/src/pulseaudio-mgr.c index 211933b..1cfe7af 100644 --- a/src/pulseaudio-mgr.c +++ b/src/pulseaudio-mgr.c @@ -19,9 +19,9 @@ with this program. If not, see . /**Notes * - * Approach now is to set up the communication channels then query the server - * fetch its default sink. If this fails then fetch the list of sinks and take - * the first one which is not the auto-null sink. + * Approach now is to set up the communication channels, query the server + * fetch its default sink/source. If this fails then fetch the list of sinks/sources + * and take the first one which is not the auto-null sink. * TODO: need to handle the situation where one chink in this linear chain breaks * i.e. start off the process again and count the attempts (note different to reconnect attempts) @@ -165,6 +165,16 @@ pm_update_mute (gboolean update) GINT_TO_POINTER (update))); } +void +pm_update_mic_gain (gint source_index, pa_cvolume new_gain) +{ + pa_operation_unref (pa_context_set_source_volume_by_index (pulse_context, + source_index, + &new_gain, + NULL, + NULL) ); +} + /**********************************************************************************************************************/ // Pulse-Audio asychronous call-backs /**********************************************************************************************************************/ @@ -217,10 +227,12 @@ pm_subscribed_events_callback (pa_context *c, break; case PA_SUBSCRIPTION_EVENT_SINK_INPUT: // We don't care about sink input removals. + g_debug ("sink input event"); if ((t & PA_SUBSCRIPTION_EVENT_TYPE_MASK) == PA_SUBSCRIPTION_EVENT_REMOVE) { - g_debug ("Just saw a sink input removal event"); + g_debug ("Just saw a sink input removal event - index = %i", index); } else if ((t & PA_SUBSCRIPTION_EVENT_TYPE_MASK) == PA_SUBSCRIPTION_EVENT_NEW) { + g_debug ("some new sink input event ? - index = %i", index); // Determine if its a VOIP app or a maybe blocking state. pa_operation_unref (pa_context_get_sink_input_info (c, index, -- cgit v1.2.3