]> code.delx.au - pulseaudio/commitdiff
resamplers: Use fastpath assert in trivial resampler
authorMaarten Bosmans <mkbosmans@gmail.com>
Wed, 23 Nov 2011 10:40:05 +0000 (11:40 +0100)
committerColin Guthrie <colin@mageia.org>
Sun, 27 Nov 2011 14:54:01 +0000 (14:54 +0000)
When the assert is disabled, the trivial resampler gets a 35% performance boost.

src/pulsecore/resampler.c

index d4a7204f4db096117b0b87d681703859f2daac22..c3b6df11f5cdbde6fc8c602a4af4059591dff5d2 100644 (file)
@@ -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);