From 761fbee66393c20fca3d2a6ad381ed9a2bb862bd Mon Sep 17 00:00:00 2001 From: Maarten Bosmans Date: Wed, 23 Nov 2011 11:40:05 +0100 Subject: [PATCH] resamplers: Use fastpath assert in trivial resampler When the assert is disabled, the trivial resampler gets a 35% performance boost. --- src/pulsecore/resampler.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pulsecore/resampler.c b/src/pulsecore/resampler.c index d4a7204f..c3b6df11 100644 --- a/src/pulsecore/resampler.c +++ b/src/pulsecore/resampler.c @@ -1391,7 +1391,7 @@ static void trivial_resample(pa_resampler *r, const pa_memchunk *input, unsigned if (j >= in_n_frames) break; - pa_assert(o_index * fz < pa_memblock_get_length(output->memblock)); + pa_assert_fp(o_index * fz < pa_memblock_get_length(output->memblock)); memcpy((uint8_t*) dst + fz * o_index, (uint8_t*) src + fz * j, (int) fz); -- 2.39.2