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:
Danny McRae
2006-05-23 19:48:05 +00:00
parent 6b6817b0d9
commit 631d1126ec
2 changed files with 9 additions and 1 deletions

View File

@@ -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],