diff options
author | Lennart Poettering <lennart@poettering.net> | 2008-10-08 00:12:15 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2008-10-08 00:12:15 +0200 |
commit | 8bc58cc7579bf238cd0a5ffd48d44ebc08eaf5a7 (patch) | |
tree | 067524be8943a64eefdc5a180c3e7055ab01b0f1 | |
parent | 776c8dec3c0df2114d5012a2089642a6677a0317 (diff) |
ignore sinks that do not carry decibel information
-rw-r--r-- | src/modules/module-flat-volume.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/modules/module-flat-volume.c b/src/modules/module-flat-volume.c index 5e339284..3bb0c876 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); |