mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-05 13:29:57 -05:00
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 8539fe9765.
This commit is contained in:
parent
664985b7c2
commit
8ea6b0585e
1 changed files with 1 additions and 10 deletions
|
|
@ -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));
|
pa_assert_fp(o_index * fz < pa_memblock_get_length(output->memblock));
|
||||||
|
|
||||||
/* Directly assign some common sample sizes, use memcpy as fallback */
|
memcpy((uint8_t*) dst + fz * o_index, (uint8_t*) src + fz * i_index, (int) fz);
|
||||||
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);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pa_memblock_release(input->memblock);
|
pa_memblock_release(input->memblock);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue