From 8bc58cc7579bf238cd0a5ffd48d44ebc08eaf5a7 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Wed, 8 Oct 2008 00:12:15 +0200 Subject: [PATCH] ignore sinks that do not carry decibel information --- src/modules/module-flat-volume.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/modules/module-flat-volume.c b/src/modules/module-flat-volume.c index 5e33928..3bb0c87 100644 --- a/src/modules/module-flat-volume.c +++ b/src/modules/module-flat-volume.c @@ -69,6 +69,9 @@ static void process_input_volume_change(pa_cvolume *dest_volume, const pa_cvolum pa_assert(dest_channel_map); pa_assert(sink); + if (!(sink->flags & PA_SINK_DECIBEL_VOLUME)) + return; + pa_log_debug("Sink input volume changed"); max_volume = *dest_virtual_volume; @@ -167,6 +170,9 @@ static void subscribe_callback(pa_core *core, pa_subscription_event_type_t t, ui if (!(sink = pa_idxset_get_by_index(core->sinks, idx))) return; + if (!(sink->flags & PA_SINK_DECIBEL_VOLUME)) + return; + pa_log_debug("Sink volume changed"); pa_log_debug("sink = %.2f", (double)pa_cvolume_avg(pa_sink_get_volume(sink, FALSE)) / PA_VOLUME_NORM); -- 2.7.4