diff --git a/include/AutomatableModel.h b/include/AutomatableModel.h index 9f53c9451..acefc95c3 100644 --- a/include/AutomatableModel.h +++ b/include/AutomatableModel.h @@ -297,7 +297,7 @@ protected: //! max() and aligned according to the step size (step size 0.05 -> value //! 0.12345 becomes 0.10 etc.). You should always call it at the end after //! doing your own calculations. - float fittedValue( float value, bool forceStep = false ) const; + float fittedValue( float value ) const; private: diff --git a/src/core/AutomatableModel.cpp b/src/core/AutomatableModel.cpp index 987beed3e..509ee4aa0 100644 --- a/src/core/AutomatableModel.cpp +++ b/src/core/AutomatableModel.cpp @@ -377,11 +377,11 @@ void AutomatableModel::setStep( const float step ) -float AutomatableModel::fittedValue( float value, bool forceStep ) const +float AutomatableModel::fittedValue( float value ) const { value = tLimit( value, m_minValue, m_maxValue ); - if( m_step != 0 && ( m_hasStrictStepSize || forceStep ) ) + if( m_step != 0 && m_hasStrictStepSize ) { value = nearbyintf( value / m_step ) * m_step; } @@ -583,7 +583,7 @@ ValueBuffer * AutomatableModel::valueBuffer() float * nvalues = m_valueBuffer.values(); for( int i = 0; i < vb->length(); i++ ) { - nvalues[i] = fittedValue( values[i], false ); + nvalues[i] = fittedValue( values[i] ); } m_lastUpdatedPeriod = s_periodCounter; m_hasSampleExactData = true;