AutomatableModel: use nearbyintf() for rounding
For some reason roundf() causes an exception on Win32 when calling with negative values. This caused LMMS to crash when turning an external MIDI pitch wheel downwards. Closes #281.
This commit is contained in:
@@ -280,7 +280,7 @@ float AutomatableModel::fittedValue( float value ) const
|
||||
|
||||
if( m_step != 0 )
|
||||
{
|
||||
value = roundf( value / m_step ) * m_step;
|
||||
value = nearbyintf( value / m_step ) * m_step;
|
||||
}
|
||||
|
||||
// correct rounding error at the border
|
||||
|
||||
Reference in New Issue
Block a user