diff options
author | Max Kellermann <max@duempel.org> | 2009-01-03 14:51:47 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2009-01-03 14:51:47 +0100 |
commit | 962f2407d2a3579b7125f937d93d04ccbeb9a453 (patch) | |
tree | e4e2fd55c02e53f94b3d63be8b8d2f714428f0b9 /src/pcm_dither.c | |
parent | 8ebb3196a854d7e870bbbe904b534641df7d5f89 (diff) | |
download | mpd-962f2407d2a3579b7125f937d93d04ccbeb9a453.tar.gz mpd-962f2407d2a3579b7125f937d93d04ccbeb9a453.tar.xz mpd-962f2407d2a3579b7125f937d93d04ccbeb9a453.zip |
pcm_utils: use the custom PRNG for volume dithering
Don't use libc's rand() function, because it is slow. Our own trivial
linear congruential generator is good enough for dithering.
Diffstat (limited to 'src/pcm_dither.c')
-rw-r--r-- | src/pcm_dither.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/pcm_dither.c b/src/pcm_dither.c index 1296d0926..984949685 100644 --- a/src/pcm_dither.c +++ b/src/pcm_dither.c @@ -17,11 +17,7 @@ */ #include "pcm_dither.h" - -static unsigned long prng(unsigned long state) -{ - return (state * 0x0019660dL + 0x3c6ef35fL) & 0xffffffffL; -} +#include "pcm_prng.h" static int16_t pcm_dither_sample_24_to_16(int32_t sample, struct pcm_dither_24 *dither) |