Skip to content

Commit

Permalink
Minimum max buffers is now 2, as 1 doesn't work with this head/tail s…
Browse files Browse the repository at this point in the history
…cheme
  • Loading branch information
mark committed Oct 26, 2021
1 parent e24cc8a commit fa22929
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions gui/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2848,9 +2848,9 @@ <h3>Audio Connections</h3>
</table>
<h3>Functions</h3>
<p class=func><span class=keyword>setMaxBuffers</span>(uint8);</p>
<p class=desc>Set the maximum buffer count for the queue to limit its size - by default 32 buffers are used on Teensy3's
<p class=desc>Set the maximum buffer block count for the queue to limit its size - by default 32 blocks are used on Teensy3's
and 80 on Teeny 4's - this allows the value to be reduced so that the queue cannot get too far ahead, nor use up lots of
audio blocks you might want for other purposes.
audio blocks you might want for other purposes. The minimum number of buffer blocks is 2.
</p>
<p class=func><span class=keyword>play</span>(int16);</p>
<p class=desc>add a single sample to the queue - no need to use getBuffer() or playBuffer() as this
Expand Down
4 changes: 2 additions & 2 deletions play_queue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@

void AudioPlayQueue::setMaxBuffers(uint8_t maxb)
{
if (maxb < 1)
maxb = 1 ;
if (maxb < 2)
maxb = 2 ;
if (maxb > MAX_BUFFERS)
maxb = MAX_BUFFERS ;
max_buffers = maxb ;
Expand Down

0 comments on commit fa22929

Please sign in to comment.