SampleTrack: Fix TCO not being played on the first tick (if it starts on

tick 0)
This commit is contained in:
Shmuel H
2017-11-06 22:29:10 +02:00
committed by Hyunjin Song
parent 89b13280de
commit e5f1007ebb

View File

@@ -674,7 +674,7 @@ bool SampleTrack::play( const MidiTime & _start, const fpp_t _frames,
if( _start >= sTco->startPosition() && _start < sTco->endPosition() )
{
if( sTco->isPlaying() == false && _start > sTco->startPosition() + sTco->startTimeOffset() )
if( sTco->isPlaying() == false && _start >= (sTco->startPosition() + sTco->startTimeOffset()) )
{
auto bufferFramesPerTick = Engine::framesPerTick (sTco->sampleBuffer ()->sampleRate ());
f_cnt_t sampleStart = bufferFramesPerTick * ( _start - sTco->startPosition() - sTco->startTimeOffset() );