Fixed segfault associated with negative times when
using user defined waves in tripleOscillator Modified Files: include/oscillator.h git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@137 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
@@ -1,3 +1,11 @@
|
||||
2006-5-23 Danny McRae <khjklujn/at/users/dot/sourceforge/dot/net>
|
||||
* include/oscillator.h:
|
||||
FM mixing sometimes calculates a negative "time" for the sampling
|
||||
which causes bad things to happen when pulling the data out of
|
||||
a user defined wave. Changed userWaveSample to use the absolute
|
||||
value of the sample, which fixes the segfaulting problem. Not
|
||||
sure whether I should care about the negative times elsewhere.
|
||||
|
||||
2006-05-22 Danny McRae <khjklujn/at/users/dot/sourceforge/dot/net>
|
||||
|
||||
* plugins/audio_file_processor/audio_file_processor.h:
|
||||
|
||||
@@ -196,7 +196,7 @@ public:
|
||||
const sampleFrame * _user_wave,
|
||||
const f_cnt_t _user_wave_frames )
|
||||
{
|
||||
const float frame = fraction( _sample ) * _user_wave_frames;
|
||||
const float frame = fraction( fabs( _sample ) ) * _user_wave_frames;
|
||||
const f_cnt_t f1 = static_cast<f_cnt_t>( frame );
|
||||
const f_cnt_t f2 = ( f1 + 1 ) % _user_wave_frames;
|
||||
return( linearInterpolate( _user_wave[f1][0],
|
||||
|
||||
Reference in New Issue
Block a user