From a9c769c26ab18a716eeed01e20a1e81f11c64475 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Fri, 1 May 2009 04:14:40 +0200 Subject: sample-util: fix iteration loop when adjusting volume of s24 samples --- src/pulsecore/sample-util.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/pulsecore/sample-util.c b/src/pulsecore/sample-util.c index 3a9b384d..a3e490ba 100644 --- a/src/pulsecore/sample-util.c +++ b/src/pulsecore/sample-util.c @@ -831,9 +831,9 @@ void pa_volume_memchunk( calc_linear_integer_volume(linear, volume); - e = (uint8_t*) ptr + c->length/3; + e = (uint8_t*) ptr + c->length; - for (channel = 0, d = ptr; d < e; d++) { + for (channel = 0, d = ptr; d < e; d += 3) { int64_t t; t = (int64_t)((int32_t) (PA_READ24NE(d) << 8)); @@ -854,9 +854,9 @@ void pa_volume_memchunk( calc_linear_integer_volume(linear, volume); - e = (uint8_t*) ptr + c->length/3; + e = (uint8_t*) ptr + c->length; - for (channel = 0, d = ptr; d < e; d++) { + for (channel = 0, d = ptr; d < e; d += 3) { int64_t t; t = (int64_t)((int32_t) (PA_READ24RE(d) << 8)); -- cgit