aboutsummaryrefslogtreecommitdiff
path: root/src/pulseaudio-mgr.c
diff options
context:
space:
mode:
authorConor Curran <conor.curran@canonical.com>2011-02-17 19:58:09 +0000
committerConor Curran <conor.curran@canonical.com>2011-02-17 19:58:09 +0000
commit8263f9aed8c1c66cfe7a7749a4d78c096165acd3 (patch)
tree7f066486d0aa1bbe57c47ba3482acfe28ab72482 /src/pulseaudio-mgr.c
parent4bebcafef41b3dbc6b4f3f3e2f6382d82390335f (diff)
downloadayatana-indicator-sound-8263f9aed8c1c66cfe7a7749a4d78c096165acd3.tar.gz
ayatana-indicator-sound-8263f9aed8c1c66cfe7a7749a4d78c096165acd3.tar.bz2
ayatana-indicator-sound-8263f9aed8c1c66cfe7a7749a4d78c096165acd3.zip
enough for one day
Diffstat (limited to 'src/pulseaudio-mgr.c')
-rw-r--r--src/pulseaudio-mgr.c20
1 files changed, 16 insertions, 4 deletions
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 <http://www.gnu.org/licenses/>.
/**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,