aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2011-10-09 12:37:32 +0200
committerMax Kellermann <max@duempel.org>2011-10-10 10:24:06 +0200
commit20c6159c041cc5ec644c51009503cf6801b6fcab (patch)
tree55e38810c32ca6059bafd61578705172feb299e2 /test
parenta47e9d1a4b5bd6b999eaec33624d7c96a29f24e6 (diff)
downloadmpd-20c6159c041cc5ec644c51009503cf6801b6fcab.tar.gz
mpd-20c6159c041cc5ec644c51009503cf6801b6fcab.tar.xz
mpd-20c6159c041cc5ec644c51009503cf6801b6fcab.zip
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).
Diffstat (limited to 'test')
-rw-r--r--test/test_pcm_dither.c4
1 files changed, 2 insertions, 2 deletions
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);