fixed peak-calculation for negative signal-values

git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@795 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
Tobias Doerffel
2008-03-16 00:21:48 +00:00
parent eeaca7a2fa
commit ab25b09935
2 changed files with 11 additions and 0 deletions

View File

@@ -741,6 +741,10 @@ float mixer::peakValueLeft( surroundSampleFrame * _ab, const f_cnt_t _frames )
{
p = _ab[f][0];
}
else if( -_ab[f][0] > p )
{
p = -_ab[f][0];
}
}
return( p );
}
@@ -757,6 +761,10 @@ float mixer::peakValueRight( surroundSampleFrame * _ab, const f_cnt_t _frames )
{
p = _ab[f][1];
}
else if( -_ab[f][1] > p )
{
p = -_ab[f][1];
}
}
return( p );
}