From bc588fc03fdfc804a96f95f04c9f248932bfd885 Mon Sep 17 00:00:00 2001 From: Conor Curran Date: Fri, 12 Feb 2010 15:25:38 +0000 Subject: more trace for default sink bug --- src/pulse-manager.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/pulse-manager.c b/src/pulse-manager.c index 82dbabf..e202c7d 100644 --- a/src/pulse-manager.c +++ b/src/pulse-manager.c @@ -101,13 +101,20 @@ Controllers & Utilities static gboolean sink_available() { - if (g_hash_table_size(sink_hash) < 1) + if (g_hash_table_size(sink_hash) < 1){ + g_debug("Sink_available returning false because sinks_hash is empty !!!"); return FALSE; + } sink_info *s = g_hash_table_lookup(sink_hash, GINT_TO_POINTER(DEFAULT_SINK_INDEX)); // TODO more testing is required for the case of having no available sink // This will need to iterate through the sinks to find an available // one as opposed to just picking the first - return ((g_strcasecmp(s->name, " auto_null ") != 0) && s->active_port == TRUE); + + g_debug("About to test for to see if the available sink is null"); + gboolean available = (g_strcasecmp(s->name, " auto_null ") != 0) && s->active_port == TRUE; + g_debug("sink_available (auto_null && !active_port) %i", available); + + return available; } static gboolean default_sink_is_muted() -- cgit v1.2.3