mirror of
https://github.com/LMMS/lmms.git
synced 2026-03-05 06:36:14 -05:00
SampleTrack: Fix TCO not being played on the first tick (if it starts on
tick 0)
This commit is contained in:
@@ -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() );
|
||||
|
||||
Reference in New Issue
Block a user