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:
@@ -1,5 +1,8 @@
|
||||
2008-03-15 Tobias Doerffel <tobydox/at/users/dot/sourceforge/dot/net>
|
||||
|
||||
* src/core/mixer.cpp:
|
||||
fixed peak-calculation for negative signal-values
|
||||
|
||||
* include/effect_view.h:
|
||||
* src/widgets/effect_view.cpp:
|
||||
- fixed random crashes when removing effect-views
|
||||
|
||||
@@ -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 );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user