aboutsummaryrefslogtreecommitdiff
path: root/src/sound-service.c
diff options
context:
space:
mode:
authorConor Curran <conor.curran@canonical.com>2010-01-27 16:23:36 +0000
committerConor Curran <conor.curran@canonical.com>2010-01-27 16:23:36 +0000
commit170afb3ecc0e216a34945eb31a9743d86bf9c325 (patch)
tree730135511e4101a2ae609729003c4486571ad122 /src/sound-service.c
parent5a86d06d8019cd9a827f69839d23268a2a6ebc51 (diff)
downloadayatana-indicator-sound-170afb3ecc0e216a34945eb31a9743d86bf9c325.tar.gz
ayatana-indicator-sound-170afb3ecc0e216a34945eb31a9743d86bf9c325.tar.bz2
ayatana-indicator-sound-170afb3ecc0e216a34945eb31a9743d86bf9c325.zip
signals now work, also pulling in slider
Diffstat (limited to 'src/sound-service.c')
-rw-r--r--src/sound-service.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/sound-service.c b/src/sound-service.c
index dc43d77..7f4b588 100644
--- a/src/sound-service.c
+++ b/src/sound-service.c
@@ -50,6 +50,7 @@ static void context_success_callback(pa_context *c, int success, void *userdata)
g_debug("Context Success Callback - result = %i", success);
}
+// TODO we are not handling multiple sinks appropriately
static void retrieve_complete_sink_list(pa_context *c, const pa_sink_info *sink, int eol, void *userdata){
if(eol > 0){
// TODO apparently never returns 0 sinks - Tested and it appears this assumption/prediction is correct.
@@ -63,6 +64,9 @@ static void retrieve_complete_sink_list(pa_context *c, const pa_sink_info *sink,
int value = g_strcasecmp(only_sink->name, " auto_null ");
g_debug("comparison outcome with auto_null is %i", value);
sink_available = (value != 0 && only_sink->active_port != NULL);
+ // Strictly speaking all_muted should only be through if all sinks are muted
+ // It is more application specific
+ all_muted = (only_sink->mute == 1);
g_debug("Available sink is named %s", only_sink->name);
g_debug("does Available sink have an active port: %i", only_sink->active_port != NULL);
g_debug("sink_available = %i", sink_available);