Skip to content

Commit

Permalink
Initialize peak controller last sample with base value fix (Stable 1.…
Browse files Browse the repository at this point in the history
…2) (#4699)
  • Loading branch information
LostRobotMusic authored and DomClark committed Jan 16, 2019
1 parent 8dea34e commit 1404b72
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion plugins/peak_controller_effect/peak_controller_effect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ PeakControllerEffect::PeakControllerEffect(
Effect( &peakcontrollereffect_plugin_descriptor, _parent, _key ),
m_effectId( rand() ),
m_peakControls( this ),
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_lastSample( 0 ),
m_autoController( NULL )
{
m_autoController = new PeakController( Engine::getSong(), this );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ PeakControllerEffectControls( PeakControllerEffect * _eff ) :
void PeakControllerEffectControls::loadSettings( const QDomElement & _this )
{
m_baseModel.loadSettings( _this, "base" );
m_effect->m_lastSample = m_baseModel.value(); //Set initial Peak Controller output to Base
m_amountModel.loadSettings( _this, "amount" );
m_muteModel.loadSettings( _this, "mute" );

Expand Down

0 comments on commit 1404b72

Please sign in to comment.