SampleTrack: In a case of recording, play a sample TCO even if its

actual data starts after that.
This commit is contained in:
Shmuel H
2017-11-17 18:16:05 +02:00
committed by Shmuel Hazan
parent b8938fd7b7
commit ed7ff82a42

View File

@@ -95,7 +95,8 @@ bool SampleTrack::play( const TimePos & _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())
|| sTco->isRecord ()) )
{
auto bufferFramesPerTick = Engine::framesPerTick (sTco->sampleBuffer ()->sampleRate ());
f_cnt_t sampleStart = bufferFramesPerTick * ( _start - sTco->startPosition() - sTco->startTimeOffset() );