diff --git a/include/sst/voice-effects/delay/ShortDelay.h b/include/sst/voice-effects/delay/ShortDelay.h index 007ecc0..493b56b 100644 --- a/include/sst/voice-effects/delay/ShortDelay.h +++ b/include/sst/voice-effects/delay/ShortDelay.h @@ -160,11 +160,12 @@ template struct ShortDelay : core::VoiceEffectTemplateBase< namespace sdsp = sst::basic_blocks::dsp; mech::copy_from_to(datainL, dataoutL); mech::copy_from_to(datainR, dataoutR); + float FIRipol = static_cast(SincTable::FIRipol_N); - lipolDelay[0].set_target(std::clamp(this->getFloatParam(fpTimeL), 0.f, maxMiliseconds) * - this->getSampleRate() / 1000.f); - lipolDelay[1].set_target(std::clamp(this->getFloatParam(fpTimeR), 0.f, maxMiliseconds) * - this->getSampleRate() / 1000.f); + lipolDelay[0].set_target(std::max((std::clamp(this->getFloatParam(fpTimeL), 0.f, maxMiliseconds) * + this->getSampleRate() / 1000.f), FIRipol)); + lipolDelay[1].set_target(std::max((std::clamp(this->getFloatParam(fpTimeR), 0.f, maxMiliseconds) * + this->getSampleRate() / 1000.f), FIRipol)); lipolFb.set_target(std::clamp(this->getFloatParam(fpFeedback), 0.f, 1.f)); lipolCross.set_target(std::clamp(this->getFloatParam(fpCrossFeed), 0.f, 1.f));