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@pmeerw.net>
This commit is contained in:
Peter Meerwald 2014-08-04 14:42:00 +02:00 committed by Tanu Kaskinen
parent c57f8422f3
commit 1499271f46
2 changed files with 2 additions and 2 deletions

View file

@ -445,7 +445,7 @@ static void pa_mix_s24_32re_c(pa_mix_info streams[], unsigned nstreams, unsigned
v = (v * cv) >> 16; v = (v * cv) >> 16;
sum += v; 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); sum = PA_CLAMP_UNLIKELY(sum, -0x80000000LL, 0x7FFFFFFFLL);

View file

@ -126,7 +126,7 @@ static const uint32_t s24_32le_result[3][10] = {
static const uint32_t s24_32be_result[3][10] = { static const uint32_t s24_32be_result[3][10] = {
{ 0x00000001, 0xffff0002, 0x7fff0003, 0x80000004, 0x9fff0005, 0x3fff0006, 0x00010007, 0xf0000008, 0x00200009, 0x0021000a }, { 0x00000001, 0xffff0002, 0x7fff0003, 0x80000004, 0x9fff0005, 0x3fff0006, 0x00010007, 0xf0000008, 0x00200009, 0x0021000a },
{ 0x00000000, 0x65e60000, 0xf1e50000, 0x73000000, 0x0ee60000, 0xb8e50000, 0xe6000000, 0xd7000000, 0xcc1c0000, 0xb31d0000 }, { 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) { static void compare_block(const pa_sample_spec *ss, const pa_memchunk *chunk, int iter) {