aboutsummaryrefslogtreecommitdiffstats
path: root/emulators/stella
diff options
context:
space:
mode:
authornectar <nectar@FreeBSD.org>2001-01-22 20:56:38 +0800
committernectar <nectar@FreeBSD.org>2001-01-22 20:56:38 +0800
commitd29590c6c13cfb6f9291dadbed1a5684a6a92ea6 (patch)
tree3a5af7cc0f2e536cb02cddb2e051b19ff1b5a18c /emulators/stella
parent3e8680aab71b18c7af3fda16f91ab40b07d0bda6 (diff)
downloadfreebsd-ports-gnome-d29590c6c13cfb6f9291dadbed1a5684a6a92ea6.tar.gz
freebsd-ports-gnome-d29590c6c13cfb6f9291dadbed1a5684a6a92ea6.tar.zst
freebsd-ports-gnome-d29590c6c13cfb6f9291dadbed1a5684a6a92ea6.zip
Use random() instead of rand() so that the white noise sounds better.
Submitted by: Mark Abene <phiber@radicalmedia.com>
Diffstat (limited to 'emulators/stella')
-rw-r--r--emulators/stella/files/patch-ad16
1 files changed, 16 insertions, 0 deletions
diff --git a/emulators/stella/files/patch-ad b/emulators/stella/files/patch-ad
new file mode 100644
index 000000000000..0916c9cff0af
--- /dev/null
+++ b/emulators/stella/files/patch-ad
@@ -0,0 +1,16 @@
+--- ../ui/sound/TIASound.c.orig Sun Jan 21 11:26:38 2001
++++ ../ui/sound/TIASound.c Mon Jan 22 06:37:37 2001
+@@ -168,10 +168,12 @@
+ uint8 chan;
+ int16 n;
+
++ srandom(time(NULL));
++
+ /* fill the 9bit polynomial with random bits */
+ for (n=0; n<POLY9_SIZE; n++)
+ {
+- Bit9[n] = rand() & 0x01; /* fill poly9 with random bits */
++ Bit9[n] = random() & 0x01; /* fill poly9 with random bits */
+ }
+
+ /* calculate the sample 'divide by N' value based on the playback freq. */