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

Can specify a minimum to maintain in the playback RingBuffer...

... this may be more than the batch size used in ongoing playback.

It is expected that this larger batch size is used only once when priming
the queue before starting play.  But then FillBuffers() may attempt to
refill up to the minimum in case demand is outpacing supply.

Thus the new number defines a "yellow zone" for the queue.
This commit is contained in:
Paul Licameli
2018-08-20 11:20:46 -04:00
parent 06fe9e843e
commit 111d2c8673
2 changed files with 22 additions and 3 deletions

View File

@@ -720,7 +720,12 @@ private:
double mSeek;
double mPlaybackRingBufferSecs;
double mCaptureRingBufferSecs;
/// Preferred batch size for replenishing the playback RingBuffer
size_t mPlaybackSamplesToCopy;
/// Occupancy of the queue we try to maintain, with bigger batches if needed
size_t mPlaybackQueueMinimum;
double mMinCaptureSecsToCopy;
/// True if audio playback is paused
bool mPaused;