mirror of
https://github.com/LMMS/lmms.git
synced 2026-01-29 16:53:07 -05:00
moved call to delayTimeModel.value() outside of process loop
This commit is contained in:
@@ -83,6 +83,7 @@ bool DelayEffect::processAudioBuffer(sampleFrame* buf, const fpp_t frames)
|
||||
double outSum = 0.0;
|
||||
const float d = dryLevel();
|
||||
const float w = wetLevel();
|
||||
const float length = m_delayControls.m_delayTimeModel.value() * engine::mixer()->processingSampleRate();
|
||||
m_lfo->setAmplitude( m_delayControls.m_lfoAmountModel.value() );
|
||||
m_lfo->setFrequency( 1.0 / m_delayControls.m_lfoTimeModel.value() );
|
||||
m_delay->setFeedback( m_delayControls.m_feedbackModel.value() );
|
||||
@@ -91,7 +92,7 @@ bool DelayEffect::processAudioBuffer(sampleFrame* buf, const fpp_t frames)
|
||||
{
|
||||
dryS[0] = buf[f][0];
|
||||
dryS[1] = buf[f][1];
|
||||
m_delay->setLength( m_delayControls.m_delayTimeModel.value(f) * engine::mixer()->processingSampleRate() * m_lfo->tick() );
|
||||
m_delay->setLength( length * m_lfo->tick() );
|
||||
m_delay->tick( buf[f] );
|
||||
|
||||
buf[f][0] = ( d * dryS[0] ) + ( w * buf[f][0] );
|
||||
|
||||
Reference in New Issue
Block a user