From 7176c56e1071822e0ce03b50671e173376007300 Mon Sep 17 00:00:00 2001 From: Lost Robot <34612565+LostRobotMusic@users.noreply.github.com> Date: Thu, 13 Jun 2024 15:18:36 -0700 Subject: [PATCH] Fix noise generator (#7318) This noise generator doesn't work properly when multiple noise sources are being generated simultaneously. --- include/Oscillator.h | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/include/Oscillator.h b/include/Oscillator.h index ea0227bd0e9..e7eccea50ca 100644 --- a/include/Oscillator.h +++ b/include/Oscillator.h @@ -163,11 +163,7 @@ class LMMS_EXPORT Oscillator 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)