use only half of valueRange<f_cnt_t>::max because otherwise we have overflows at several places

git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@518 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
Tobias Doerffel
2007-08-06 13:28:55 +00:00
parent e02ac19e6d
commit 83f339852d
2 changed files with 3 additions and 2 deletions

View File

@@ -154,7 +154,7 @@ presetPreviewPlayHandle::presetPreviewPlayHandle(
// create note-play-handle for it
m_previewNote = new notePlayHandle(
s_previewTC->previewInstrumentTrack(), 0,
valueRanges<f_cnt_t>::max,
valueRanges<f_cnt_t>::max / 2,
note( 0, 0, static_cast<tones>( A ),
static_cast<octaves>( DEFAULT_OCTAVE - 1 ), 100 ) );

View File

@@ -630,7 +630,8 @@ void instrumentTrack::processInEvent( const midiEvent & _me,
notePlayHandle( this,
_time.frames(
engine::framesPerTact64th() ),
valueRanges<f_cnt_t>::max, n );
valueRanges<f_cnt_t>::max / 2,
n );
if( engine::getMixer()->addPlayHandle(
nph ) )
{