From fad13626bc8f2e96328a472dd8fcc52b368bbf9e Mon Sep 17 00:00:00 2001 From: Douglas <34612565+DouglasDGI@users.noreply.github.com> Date: Fri, 1 Jun 2018 21:41:52 -0600 Subject: [PATCH] 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. --- plugins/peak_controller_effect/peak_controller_effect.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/peak_controller_effect/peak_controller_effect.cpp b/plugins/peak_controller_effect/peak_controller_effect.cpp index f7dbb14f9..2b39352ff 100644 --- a/plugins/peak_controller_effect/peak_controller_effect.cpp +++ b/plugins/peak_controller_effect/peak_controller_effect.cpp @@ -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 );