diff options
author | Max Kellermann <max@duempel.org> | 2013-01-31 22:43:28 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2013-01-31 22:54:10 +0100 |
commit | f2491c88c86707cc35c7dfc30a1b5a0a29886540 (patch) | |
tree | d7b2079f3122aa486b8717c916b596c421944f82 /test/test_pcm_dither.cxx | |
parent | 1b175025fecb1c10e6719d4ab79c188d473fccc4 (diff) |
PcmDither: convert struct to a class
Diffstat (limited to 'test/test_pcm_dither.cxx')
-rw-r--r-- | test/test_pcm_dither.cxx | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/test/test_pcm_dither.cxx b/test/test_pcm_dither.cxx index 44830746f..6d1ed686a 100644 --- a/test/test_pcm_dither.cxx +++ b/test/test_pcm_dither.cxx @@ -37,9 +37,7 @@ random24() void test_pcm_dither_24() { - struct pcm_dither dither; - - pcm_dither_24_init(&dither); + PcmDither dither; enum { N = 256 }; int32_t src[N]; @@ -48,7 +46,7 @@ test_pcm_dither_24() int16_t dest[N]; - pcm_dither_24_to_16(&dither, dest, src, src + N); + dither.Dither24To16(dest, src, src + N); for (unsigned i = 0; i < N; ++i) { g_assert_cmpint(dest[i], >=, (src[i] >> 8) - 8); @@ -59,9 +57,7 @@ test_pcm_dither_24() void test_pcm_dither_32() { - struct pcm_dither dither; - - pcm_dither_24_init(&dither); + PcmDither dither; enum { N = 256 }; int32_t src[N]; @@ -70,7 +66,7 @@ test_pcm_dither_32() int16_t dest[N]; - pcm_dither_32_to_16(&dither, dest, src, src + N); + dither.Dither32To16(dest, src, src + N); for (unsigned i = 0; i < N; ++i) { g_assert_cmpint(dest[i], >=, (src[i] >> 16) - 8); |