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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user