From 20c6159c041cc5ec644c51009503cf6801b6fcab Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sun, 9 Oct 2011 12:37:32 +0200 Subject: pcm_dither: pass an "end" pointer instead of a sample count This is easier and more efficient to loop on, because only two variables get modified (src and dest). --- test/test_pcm_dither.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test/test_pcm_dither.c') diff --git a/test/test_pcm_dither.c b/test/test_pcm_dither.c index 889c61ccd..44d105207 100644 --- a/test/test_pcm_dither.c +++ b/test/test_pcm_dither.c @@ -48,7 +48,7 @@ test_pcm_dither_24(void) int16_t dest[N]; - pcm_dither_24_to_16(&dither, dest, src, N); + pcm_dither_24_to_16(&dither, dest, src, src + N); for (unsigned i = 0; i < N; ++i) { g_assert_cmpint(dest[i], >=, (src[i] >> 8) - 8); @@ -70,7 +70,7 @@ test_pcm_dither_32(void) int16_t dest[N]; - pcm_dither_32_to_16(&dither, dest, src, N); + pcm_dither_32_to_16(&dither, dest, src, src + N); for (unsigned i = 0; i < N; ++i) { g_assert_cmpint(dest[i], >=, (src[i] >> 16) - 8); -- cgit v1.2.3