1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-10-25 07:43:54 +02:00

Declare and allocate time value queue

This commit is contained in:
Paul Licameli
2018-08-11 23:56:54 -04:00
parent 67a9823434
commit b2df5e0673
2 changed files with 27 additions and 0 deletions

View File

@@ -984,6 +984,21 @@ private:
void RealTimeRestart();
} mPlaybackSchedule;
// Another circular buffer
// Holds track time values corresponding to every nth sample in the playback
// buffers, for some large n
struct TimeQueue {
Doubles mData;
size_t mSize{ 0 };
// These need not be updated atomically, because we rely on the atomics
// in the playback ring buffers to supply the synchronization. Still,
// align them to avoid false sharing.
alignas(64) struct Cursor {
size_t mIndex {};
size_t mRemainder {};
} mHead, mTail;
} mTimeQueue;
};
#endif