aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-01-07 18:07:19 +0100
committerMax Kellermann <max@duempel.org>2009-01-07 18:07:19 +0100
commitb7b5e3f9c30a9ed898cddb1b5e4b471750824600 (patch)
tree2d9863407c34b3e4bbac29833022ccf9c654343a /src
parent3fd1fa31ca26c0cbf0f74a1f11dbaeaa176ab6ff (diff)
downloadmpd-b7b5e3f9c30a9ed898cddb1b5e4b471750824600.tar.gz
mpd-b7b5e3f9c30a9ed898cddb1b5e4b471750824600.tar.xz
mpd-b7b5e3f9c30a9ed898cddb1b5e4b471750824600.zip
pcm_prng: renamed prng() to pcm_prng()
Diffstat (limited to '')
-rw-r--r--src/pcm_dither.c2
-rw-r--r--src/pcm_prng.h3
-rw-r--r--src/pcm_volume.h2
3 files changed, 4 insertions, 3 deletions
diff --git a/src/pcm_dither.c b/src/pcm_dither.c
index 984949685..2b4c8ab50 100644
--- a/src/pcm_dither.c
+++ b/src/pcm_dither.c
@@ -43,7 +43,7 @@ pcm_dither_sample_24_to_16(int32_t sample, struct pcm_dither_24 *dither)
/* round */
output = sample + round;
- rnd = prng(dither->random);
+ rnd = pcm_prng(dither->random);
output += (rnd & mask) - (dither->random & mask);
dither->random = rnd;
diff --git a/src/pcm_prng.h b/src/pcm_prng.h
index e961baacd..f39d4c096 100644
--- a/src/pcm_prng.h
+++ b/src/pcm_prng.h
@@ -23,7 +23,8 @@
* A very simple linear congruential PRNG. It's good enough for PCM
* dithering.
*/
-static unsigned long prng(unsigned long state)
+static unsigned long
+pcm_prng(unsigned long state)
{
return (state * 0x0019660dL + 0x3c6ef35fL) & 0xffffffffL;
}
diff --git a/src/pcm_volume.h b/src/pcm_volume.h
index eb3f8d6ee..ec6c2ea4e 100644
--- a/src/pcm_volume.h
+++ b/src/pcm_volume.h
@@ -46,7 +46,7 @@ pcm_dither(void)
static unsigned long state;
uint32_t r;
- r = state = prng(state);
+ r = state = pcm_prng(state);
return (r & 511) - ((r >> 9) & 511);
}