Skip to content

Commit

Permalink
Changes noncyclic smoothing behaviour (#3137)
Browse files Browse the repository at this point in the history
  • Loading branch information
DeRobyJ authored and Umcaruje committed Dec 29, 2016
1 parent 3157dbf commit 0bf7b13
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/gui/widgets/Graph.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -624,12 +624,12 @@ void graphModel::smoothNonCyclic()
QVector<float> temp = m_samples;

// Smoothing
m_samples[0] = ( ( temp[0] * 3 ) + temp[1] ) * 0.25f;
//m_samples[0] = ( ( temp[0] * 3 ) + temp[1] ) * 0.25f;
for ( int i=1; i < ( length()-1 ); i++ )
{
m_samples[i] = ( temp[i-1] + ( temp[i] * 2 ) + temp[i+1] ) * 0.25f;
}
m_samples[length()-1] = ( temp[length()-2] + ( temp[length()-1] * 3 ) ) * 0.25f;
//m_samples[length()-1] = ( temp[length()-2] + ( temp[length()-1] * 3 ) ) * 0.25f;

emit samplesChanged(0, length()-1);
}
Expand Down

0 comments on commit 0bf7b13

Please sign in to comment.