From 9a0db6a17caad806cff9be2498b515e16716fade Mon Sep 17 00:00:00 2001 From: Lost Robot <34612565+LostRobotMusic@users.noreply.github.com> Date: Wed, 26 Jun 2024 13:41:54 -0500 Subject: [PATCH] Fix pitch shifter glide 0 division (#7348) --- plugins/GranularPitchShifter/GranularPitchShifterEffect.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/GranularPitchShifter/GranularPitchShifterEffect.cpp b/plugins/GranularPitchShifter/GranularPitchShifterEffect.cpp index ee796d8e3..edf24c332 100755 --- a/plugins/GranularPitchShifter/GranularPitchShifterEffect.cpp +++ b/plugins/GranularPitchShifter/GranularPitchShifterEffect.cpp @@ -87,7 +87,7 @@ bool GranularPitchShifterEffect::processAudioBuffer(sampleFrame* buf, const fpp_ if (glide != m_oldGlide) { m_oldGlide = glide; - m_glideCoef = std::exp(-1 / (glide * m_sampleRate)); + m_glideCoef = glide > 0 ? std::exp(-1 / (glide * m_sampleRate)) : 0; } const float shapeK = cosWindowApproxK(shape);