From 16fe69911141a311d6e17b5512a2a98070dca79b Mon Sep 17 00:00:00 2001 From: Blackaddr Audio Date: Wed, 11 Mar 2020 20:26:56 -0400 Subject: [PATCH] Fixed a bug related to setting of internal delay value (#10) --- src/effects/AudioEffectDelayExternal.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/effects/AudioEffectDelayExternal.cpp b/src/effects/AudioEffectDelayExternal.cpp index f81e16a..0fbbd47 100644 --- a/src/effects/AudioEffectDelayExternal.cpp +++ b/src/effects/AudioEffectDelayExternal.cpp @@ -202,7 +202,11 @@ void BAAudioEffectDelayExternal::initialize(void) avail = memsize - m_allocated[m_mem]; - if (m_requestedDelayLength > avail) samples = avail; + if (m_requestedDelayLength > avail) { + samples = avail; + } else { + samples = m_requestedDelayLength; + } m_memoryStart = m_allocated[m_mem]; m_allocated[m_mem] += samples; m_memoryLength = samples;