diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/pulsecore/resampler.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/pulsecore/resampler.c b/src/pulsecore/resampler.c index 2256516e..43771dc8 100644 --- a/src/pulsecore/resampler.c +++ b/src/pulsecore/resampler.c @@ -1122,8 +1122,13 @@ static void remap_channels_matrix (pa_resampler *r, void *dst, const void *src, d = (float *)dst + oc; s = (float *)src + ic; - for (i = n; i > 0; i--, s += n_ic, d += n_oc) - *d += *s * vol; + if (vol >= 1.0) { + for (i = n; i > 0; i--, s += n_ic, d += n_oc) + *d += *s; + } else { + for (i = n; i > 0; i--, s += n_ic, d += n_oc) + *d += *s * vol; + } } } |