Initialize peak controller last sample with base value (#4382)

* Bug fix in peak_controller_effect.cpp

This change makes it so that when an LMMS project is loaded, each knob connected to a Peak Controller will be set to the Peak Controller's Base value, rather than its minimum possible value.
This commit is contained in:
Douglas
2018-06-01 21:41:52 -06:00
committed by Colin Wallace
parent 2c672d47fe
commit fad13626bc

View File

@@ -64,7 +64,7 @@ PeakControllerEffect::PeakControllerEffect(
Effect( &peakcontrollereffect_plugin_descriptor, _parent, _key ),
m_effectId( rand() ),
m_peakControls( this ),
m_lastSample( 0 ),
m_lastSample( m_peakControls.m_baseModel.value() ), //sets the value to the Peak Controller's Base value (rather than 0 like in previous versions)
m_autoController( NULL )
{
m_autoController = new PeakController( Engine::getSong(), this );