diff options
author | Colin Guthrie <colin@mageia.org> | 2012-03-23 09:24:48 +0000 |
---|---|---|
committer | Colin Guthrie <colin@mageia.org> | 2012-03-28 11:31:36 +0100 |
commit | 8ea6b0585e802490d160814b61d0165b875e0a84 (patch) | |
tree | b544a11b4b68147ab63760375ee78a4ed64abc28 | |
parent | 664985b7c2fdcc218b4c649f8b52f5047d778659 (diff) |
Revert "resamplers: Optimize trivial resampler"
This causes problems with 24kHz audio (results in echoing)
when upscaling to 44.1kHz or 48kHz.
It can be reapplied when the optimisation works for all cases.
This reverts commit 8539fe9765e5713f9863ab15d0c5b42189f98ae2.
-rw-r--r-- | src/pulsecore/resampler.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/src/pulsecore/resampler.c b/src/pulsecore/resampler.c index 66769437..9a651f4a 100644 --- a/src/pulsecore/resampler.c +++ b/src/pulsecore/resampler.c @@ -1436,16 +1436,7 @@ static void trivial_resample(pa_resampler *r, const pa_memchunk *input, unsigned pa_assert_fp(o_index * fz < pa_memblock_get_length(output->memblock)); - /* Directly assign some common sample sizes, use memcpy as fallback */ - if (r->w_sz == 2) { - for (unsigned c = 0; c < r->o_ss.channels; c++) - ((uint16_t *) dst)[o_index+c] = ((uint16_t *) src)[i_index+c]; - } else if (r->w_sz == 4) { - for (unsigned c = 0; c < r->o_ss.channels; c++) - ((uint32_t *) dst)[o_index+c] = ((uint32_t *) src)[i_index+c]; - } else { - memcpy((uint8_t *) dst + fz * o_index, (uint8_t *) src + fz * i_index, (int) fz); - } + memcpy((uint8_t*) dst + fz * o_index, (uint8_t*) src + fz * i_index, (int) fz); } pa_memblock_release(input->memblock); |