Skip to content

Commit

Permalink
fixup! SampleTrack: Make sure an empty TCO with isRecord would still …
Browse files Browse the repository at this point in the history
…be "played" (recorded).
  • Loading branch information
Reflexe committed Aug 21, 2021
1 parent 4ab4715 commit e5c795c
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/tracks/SampleTrack.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,14 @@ bool SampleTrack::play( const TimePos & _start, const fpp_t _frames,
//if the Tco smaller than the sample length we play only until Tco end
//else we play the sample to the end but nothing more
f_cnt_t samplePlayLength = tcoFrameLength > sampleBufferLength ? sampleBufferLength : tcoFrameLength;
//we only play within the sampleBuffer limits
// anyway, "play" (record) this TCO if is recording.

// In case we are recoding, "play" the whole TCO.
if(sTco->isRecord()) {
samplePlayLength = tcoFrameLength;
}

//we only play within the sampleBuffer limits
//Ignore that in case of recoding.
if(sampleStart < sampleBufferLength || sTco->isRecord ())
{
sTco->setSampleStartFrame(sampleStart);
Expand Down

0 comments on commit e5c795c

Please sign in to comment.