Increase time queue allocation by one entry...

... guarantee the gap between producer and consumer is more than one grain, so
that the consumed entry is not still being produced.

Fixes small errors in positioning of the green play head line.
This commit is contained in:
Paul Licameli 2021-01-02 22:40:50 -05:00
parent 20d72ee745
commit 510c5683d9
1 changed files with 1 additions and 1 deletions

View File

@ -1922,7 +1922,7 @@ bool AudioIO::AllocateBuffers(
mPlaybackBuffers[i] =
std::make_unique<RingBuffer>(floatSample, playbackBufferSize);
const auto timeQueueSize =
const auto timeQueueSize = 1 +
(playbackBufferSize + TimeQueueGrainSize - 1)
/ TimeQueueGrainSize;
mTimeQueue.mData.reinit( timeQueueSize );