diff options
Diffstat (limited to 'src/pulse-manager.c')
-rw-r--r-- | src/pulse-manager.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/pulse-manager.c b/src/pulse-manager.c index a95c887..c6fc6ac 100644 --- a/src/pulse-manager.c +++ b/src/pulse-manager.c @@ -123,7 +123,6 @@ static void destroy_sink_info(void *value) { sink_info *sink = (sink_info*)value; g_free(sink->name); - g_free(sink->description); g_free(sink); } @@ -299,7 +298,6 @@ static void pulse_sink_info_callback(pa_context *c, const pa_sink_info *sink, in value = g_new0(sink_info, 1); value->index = sink->index; value->name = g_strdup(sink->name); - value->description = g_strdup(sink->description); value->mute = !!sink->mute; value->volume = sink->volume; value->base_volume = sink->base_volume; @@ -368,13 +366,11 @@ static void update_sink_info(pa_context *c, const pa_sink_info *info, int eol, v { sink_info *s = g_hash_table_lookup(sink_hash, GINT_TO_POINTER(info->index)); s->name = g_strdup(info->name); - s->description = g_strdup(info->description); gboolean mute_changed = s->mute != !!info->mute; s->mute = !!info->mute; gboolean volume_changed = (pa_cvolume_equal(&info->volume, &s->volume) == 0); s->volume = info->volume; s->base_volume = info->base_volume; - s->channel_map = info->channel_map; if(DEFAULT_SINK_INDEX == s->index) { //update the UI @@ -406,11 +402,9 @@ static void update_sink_info(pa_context *c, const pa_sink_info *info, int eol, v value = g_new0(sink_info, 1); value->index = info->index; value->name = g_strdup(info->name); - value->description = g_strdup(info->description); value->mute = !!info->mute; value->volume = info->volume; value->base_volume = info->base_volume; - value->channel_map = info->channel_map; g_hash_table_insert(sink_hash, GINT_TO_POINTER(value->index), value); g_debug("pulse-manager:update_sink_info -> After adding a new sink to our hash"); sound_service_dbus_update_sink_availability(dbus_service, TRUE); @@ -463,9 +457,13 @@ static void subscribed_events_callback(pa_context *c, enum pa_subscription_event g_debug("PA_SUBSCRIPTION_EVENT_SINK event triggered"); if ((t & PA_SUBSCRIPTION_EVENT_TYPE_MASK) == PA_SUBSCRIPTION_EVENT_REMOVE) { - if(index == DEFAULT_SINK_INDEX) - g_debug("PA_SUBSCRIPTION_EVENT_SINK REMOVAL event triggered - default sink has been removed !!"); + if(index == DEFAULT_SINK_INDEX){ + g_debug("PA_SUBSCRIPTION_EVENT_SINK REMOVAL event triggered - default sink has been removed !! \n updating UI to reflect the change"); sound_service_dbus_update_sink_availability(dbus_service, FALSE); + } + else{ + g_debug("PA_SUBSCRIPTION_EVENT_SINK REMOVAL - some device other than the default - no panic"); + } } else { |