mirror of
https://github.com/cookiengineer/audacity
synced 2025-10-25 07:43:54 +02:00
Use the TimeQueue to communicate play head position updates for scrubbing...
... from the Audio thread to the PortAudio thread; the old ScrubQueue::Consumer() function keeps only a vestigial purpose to prevent the scrub queue from blocking.
This commit is contained in:
@@ -807,6 +807,7 @@ private:
|
||||
std::unique_ptr<ScrubQueue> mScrubQueue;
|
||||
|
||||
bool mSilentScrub;
|
||||
double mScrubSpeed;
|
||||
sampleCount mScrubDuration;
|
||||
#endif
|
||||
|
||||
@@ -989,6 +990,7 @@ private:
|
||||
struct TimeQueue {
|
||||
Doubles mData;
|
||||
size_t mSize{ 0 };
|
||||
double mLastTime {};
|
||||
// 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.
|
||||
@@ -996,7 +998,12 @@ private:
|
||||
size_t mIndex {};
|
||||
size_t mRemainder {};
|
||||
} mHead, mTail;
|
||||
} mTimeQueue;
|
||||
|
||||
void Producer(
|
||||
const PlaybackSchedule &schedule, double rate, double scrubSpeed,
|
||||
size_t nSamples );
|
||||
double Consumer( size_t nSamples, double rate );
|
||||
} mTimeQueue;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user