Fix pitch shifter glide 0 division (#7348)

This commit is contained in:
Lost Robot
2024-06-26 13:41:54 -05:00
committed by GitHub
parent 6634cec127
commit 9a0db6a17c

View File

@@ -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);