[pulseaudio-commits] src/pulsecore src/tests

Tanu Kaskinen tanuk at kemper.freedesktop.org
Sun Aug 10 00:35:11 PDT 2014


 src/pulsecore/mix.c  |    2 +-
 src/tests/mix-test.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 1499271f46c5b7289a61a4fa508cc412544842c4
Author: Peter Meerwald <pmeerw at pmeerw.net>
Date:   Mon Aug 4 14:42:00 2014 +0200

    mix: Fix mixing of S24 samples stored as S32RE
    
    pa_mix_s24_32re_c() should advance m->ptr by sizeof(int32_t)
    
    http://lists.freedesktop.org/archives/pulseaudio-discuss/2014-July/020998.html
    
    Signed-off-by: Peter Meerwald <pmeerw at pmeerw.net>

diff --git a/src/pulsecore/mix.c b/src/pulsecore/mix.c
index 4b789a6..10567d6 100644
--- a/src/pulsecore/mix.c
+++ b/src/pulsecore/mix.c
@@ -445,7 +445,7 @@ static void pa_mix_s24_32re_c(pa_mix_info streams[], unsigned nstreams, unsigned
                 v = (v * cv) >> 16;
                 sum += v;
             }
-            m->ptr = (uint8_t*) m->ptr + 3;
+            m->ptr = (uint8_t*) m->ptr + sizeof(int32_t);
         }
 
         sum = PA_CLAMP_UNLIKELY(sum, -0x80000000LL, 0x7FFFFFFFLL);
diff --git a/src/tests/mix-test.c b/src/tests/mix-test.c
index ae65209..9e5a0cc 100644
--- a/src/tests/mix-test.c
+++ b/src/tests/mix-test.c
@@ -126,7 +126,7 @@ static const uint32_t s24_32le_result[3][10] = {
 static const uint32_t s24_32be_result[3][10] = {
 { 0x00000001, 0xffff0002, 0x7fff0003, 0x80000004, 0x9fff0005, 0x3fff0006, 0x00010007, 0xf0000008, 0x00200009, 0x0021000a },
 { 0x00000000, 0x65e60000, 0xf1e50000, 0x73000000, 0x0ee60000, 0xb8e50000, 0xe6000000, 0xd7000000, 0xcc1c0000, 0xb31d0000 },
-{ 0x00000000, 0xe5010200, 0x00036400, 0x0470e500, 0xf3000000, 0xe5010500, 0x0006ad00, 0x07f7e400, 0xe6010000, 0x00000800 },
+{ 0x00000000, 0x64e60100, 0x70e50100, 0xf3000000, 0xade50100, 0xf7e40100, 0xe6010000, 0xc7010000, 0xcc3c0000, 0xb33e0000 },
 };
 
 static void compare_block(const pa_sample_spec *ss, const pa_memchunk *chunk, int iter) {



More information about the pulseaudio-commits mailing list