summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTanu Kaskinen <tanuk@iki.fi>2011-04-15 18:36:38 +0300
committerColin Guthrie <colin@mageia.org>2011-04-18 10:31:51 +0200
commita2581e6688c3fdcde4734f52a6b5fbc489f782b3 (patch)
treeb31ded6592ac698642659dcd898604badce65ea5
parent0e60a80afae49fbde327388be485f7f5691828b8 (diff)
sink-input: Check flat volume with pa_sink_flat_volume_enabled().
Checking just the flag doesn't work if the sink uses volume sharing, because such sinks never have PA_SINK_FLAT_VOLUME set.
-rw-r--r--src/pulsecore/sink-input.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/pulsecore/sink-input.c b/src/pulsecore/sink-input.c
index 46f26f92..1931d994 100644
--- a/src/pulsecore/sink-input.c
+++ b/src/pulsecore/sink-input.c
@@ -1020,7 +1020,7 @@ void pa_sink_input_set_volume(pa_sink_input *i, const pa_cvolume *volume, pa_boo
pa_assert(volume->channels == 1 || pa_cvolume_compatible(volume, &i->sample_spec));
pa_assert(i->volume_writable);
- if ((i->sink->flags & PA_SINK_FLAT_VOLUME) && !absolute) {
+ if (!absolute && pa_sink_flat_volume_enabled(i->sink)) {
v = i->sink->reference_volume;
pa_cvolume_remap(&v, &i->sink->channel_map, &i->channel_map);
@@ -1043,7 +1043,7 @@ void pa_sink_input_set_volume(pa_sink_input *i, const pa_cvolume *volume, pa_boo
i->volume = *volume;
i->save_volume = save;
- if (i->sink->flags & PA_SINK_FLAT_VOLUME) {
+ if (pa_sink_flat_volume_enabled(i->sink)) {
/* We are in flat volume mode, so let's update all sink input
* volumes and update the flat volume of the sink */