Rand: Replacing rand() for portable tests
commit604c9ef7ee3f8f2c5a2093a97b75e090bcc494c8
authorfundamental <mark.d.mccurry@gmail.com>
Tue, 13 Sep 2011 21:02:36 +0000 (13 17:02 -0400)
committerfundamental <mark.d.mccurry@gmail.com>
Tue, 13 Sep 2011 21:02:36 +0000 (13 17:02 -0400)
treef5a9f1818a90fa81f6d8c3c3147d479c1f5dca58
parentd44dc9b66d503405cac29b73cdd15c962f0098b2
Rand: Replacing rand() for portable tests

In order to keep tests simple with respect to signal processing code, a portable
Pseudo Random Number Generator was built.
This will ensure that the sequence of random numbers from a given seed are
identical from platform to platform.
As this is not a cryptographic application, this behavior should not be an
issue.
Basic statistics of random source verified.

For source of magic numbers, see glibc.
16 files changed:
src/DSP/Unison.h
src/Effects/EffectLFO.cpp
src/Misc/Util.cpp
src/Misc/Util.h
src/Output/DSSIaudiooutput.cpp
src/Params/FilterParams.cpp
src/Synth/ADnote.cpp
src/Synth/LFO.cpp
src/Synth/OscilGen.cpp
src/Tests/AdNoteTest.h
src/Tests/CMakeLists.txt
src/Tests/OscilGenTest.h
src/Tests/RandTest.h
src/Tests/SubNoteTest.h
src/globals.h
src/main.cpp