From f27d1434da86166b7ee5c2ec15b7986fccf3eec0 Mon Sep 17 00:00:00 2001 From: bog Date: Thu, 1 Feb 2024 08:11:02 +0100 Subject: [PATCH] :bug: sine phase overflow. --- lib/Sine.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/Sine.cpp b/lib/Sine.cpp index 31e8a62..7fd842f 100644 --- a/lib/Sine.cpp +++ b/lib/Sine.cpp @@ -42,6 +42,8 @@ namespace muz m_phases[i] += 2 * M_PI * m_out_freq[i] / static_cast(m_conf.samplerate()); + m_phases[i] = std::fmod(m_phases[i], 2.0f * M_PI); + out[i] = value; } }