From 49239c3842ad13be6c746a063c46f14746b207a3 Mon Sep 17 00:00:00 2001 From: Mike Brady Date: Mon, 30 Jan 2017 21:05:52 +0000 Subject: [PATCH] Use a precalculated array of pseudorandom numbers to do dither, reducing runtime load on low-powered processors. --- player.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/player.c b/player.c index edf2f4b0..295b815a 100644 --- a/player.c +++ b/player.c @@ -676,8 +676,8 @@ static inline void process_sample(int32_t sample, char **outp, enum sps_format_t break; } dither_mask -= 1; - int64_t r = r64i(); - // int64_t r = ranarray64i(); + // int64_t r = r64i(); + int64_t r = ranarray64i(); // use an array of precalculated pseudorandom numbers rather than calculating them on the fly. Should be easier on low-powered processors int64_t tpdf = (r & dither_mask) - (previous_random_number & dither_mask); previous_random_number = r;