From a2581e6688c3fdcde4734f52a6b5fbc489f782b3 Mon Sep 17 00:00:00 2001 From: Tanu Kaskinen Date: Fri, 15 Apr 2011 18:36:38 +0300 Subject: [PATCH] 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. --- src/pulsecore/sink-input.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pulsecore/sink-input.c b/src/pulsecore/sink-input.c index 46f26f9..1931d99 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 */ -- 2.7.4