Fix noise generator (#7318)

This noise generator doesn't work properly when multiple noise sources are being generated simultaneously.
This commit is contained in:
Lost Robot
2024-06-13 15:18:36 -07:00
committed by GitHub
parent 43fbcca9cb
commit b1ee626633

View File

@@ -163,11 +163,7 @@ public:
static inline sample_t noiseSample( const float )
{
// Precise implementation
// return 1.0f - rand() * 2.0f / RAND_MAX;
// Fast implementation
return 1.0f - fast_rand() * 2.0f / FAST_RAND_MAX;
return 1.0f - rand() * 2.0f / RAND_MAX;
}
static sample_t userWaveSample(const SampleBuffer* buffer, const float sample)