From: Lennart Poettering Date: Tue, 7 Oct 2008 22:12:15 +0000 (+0200) Subject: ignore sinks that do not carry decibel information X-Git-Tag: submit/2.0-panda/20130828.192557~2590^2~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8bc58cc7579bf238cd0a5ffd48d44ebc08eaf5a7;p=profile%2Fivi%2Fpulseaudio-panda.git ignore sinks that do not carry decibel information --- 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);