From 9b8f20f617358b40b6641925770787627b73b0df Mon Sep 17 00:00:00 2001 From: Arun Raghavan Date: Tue, 19 Oct 2010 13:03:48 +0530 Subject: volume: Fix incorrect usage of PA_VOLUME_IS_VALID The commit that introduced this macro was incorrect in some places. This patch fixes these. Thanks to Pierre-Louis Bossart for pointing this out. --- src/pulsecore/core-scache.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/pulsecore/core-scache.c') diff --git a/src/pulsecore/core-scache.c b/src/pulsecore/core-scache.c index cd388efe..5ec6159d 100644 --- a/src/pulsecore/core-scache.c +++ b/src/pulsecore/core-scache.c @@ -336,12 +336,12 @@ int pa_scache_play_item(pa_core *c, const char *name, pa_sink *sink, pa_volume_t pass_volume = TRUE; - if (e->volume_is_set && !PA_VOLUME_IS_VALID(volume)) { + if (e->volume_is_set && PA_VOLUME_IS_VALID(volume)) { pa_cvolume_set(&r, e->sample_spec.channels, volume); pa_sw_cvolume_multiply(&r, &r, &e->volume); } else if (e->volume_is_set) r = e->volume; - else if (!PA_VOLUME_IS_VALID(volume)) + else if (PA_VOLUME_IS_VALID(volume)) pa_cvolume_set(&r, e->sample_spec.channels, volume); else pass_volume = FALSE; -- cgit