Delay added addional smoothing to the delay time parameter

The delay time paramter was responding very badly ui user input.
This now has a much more plesant sound, not dis simular to a
record being sped up or slowed down.
This commit is contained in:
Dave French
2015-03-01 00:03:24 +00:00
parent 9343cb7549
commit 8a588d4934

View File

@@ -118,7 +118,8 @@ bool DelayEffect::processAudioBuffer( sampleFrame* buf, const fpp_t frames )
m_delay->setFeedback( *feedbackPtr );
m_lfo->setFrequency( *lfoTimePtr );
sampleLength = *lengthPtr * Engine::mixer()->processingSampleRate();
m_delay->setLength( sampleLength + ( *amplitudePtr * ( float )m_lfo->tick() ) );
m_currentLength = linearInterpolate( sampleLength, m_currentLength, 0.9999 );
m_delay->setLength( m_currentLength + ( *amplitudePtr * ( float )m_lfo->tick() ) );
m_delay->tick( buf[f] );
buf[f][0] *= m_outGain;