SampleRecordHandle: Obtain the offset to the record with a parameter

instead of hacking sampleBuffer ()->startFrame ().

That solves a bug with `startFrame ()` being negetive in recording some
cases.
This commit is contained in:
Shmuel H
2017-11-17 20:32:08 +02:00
committed by Shmuel Hazan
parent ed7ff82a42
commit 7184ce6e5d
3 changed files with 11 additions and 5 deletions

View File

@@ -41,7 +41,7 @@ class Track;
class SampleRecordHandle : public PlayHandle
{
public:
SampleRecordHandle( SampleTCO* tco );
explicit SampleRecordHandle(SampleTCO* tco, TimePos startRecordTimeOffset);
virtual ~SampleRecordHandle();
void play( sampleFrame * _working_buffer ) override;
@@ -65,7 +65,10 @@ private:
Track * m_track;
BBTrack * m_bbTrack;
SampleTCO * m_tco;
// The offset from the start of m_track that the record has
// started from.
TimePos m_startRecordTimeOffset;
} ;