Skip to content

Commit e5f1007

Browse files
ReflexePhysSong
authored andcommitted
SampleTrack: Fix TCO not being played on the first tick (if it starts on
tick 0)
1 parent 89b1328 commit e5f1007

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/tracks/SampleTrack.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -674,7 +674,7 @@ bool SampleTrack::play( const MidiTime & _start, const fpp_t _frames,
674674

675675
if( _start >= sTco->startPosition() && _start < sTco->endPosition() )
676676
{
677-
if( sTco->isPlaying() == false && _start > sTco->startPosition() + sTco->startTimeOffset() )
677+
if( sTco->isPlaying() == false && _start >= (sTco->startPosition() + sTco->startTimeOffset()) )
678678
{
679679
auto bufferFramesPerTick = Engine::framesPerTick (sTco->sampleBuffer ()->sampleRate ());
680680
f_cnt_t sampleStart = bufferFramesPerTick * ( _start - sTco->startPosition() - sTco->startTimeOffset() );

0 commit comments

Comments
 (0)