os: reset one packet further in Audio_out stream

Since all Audio_out server components loop over the packet stream
queue it is save to reset the tail position to one after the play
position. We have to do this because we do not know exactly when
the play position changes (i.e. the driver has processed the packet)
and we might end up with a tail position before the current play
position.

Issue #1796.
This commit is contained in:
Josef Söntgen 2015-11-26 14:26:02 +01:00 committed by Christian Helmuth
parent e3f301a540
commit 6d1e417250
1 changed files with 1 additions and 1 deletions

View File

@ -263,7 +263,7 @@ class Audio_out::Stream
*
* This means that allocation will start at current queue position.
*/
void reset() { _tail = _pos; }
void reset() { _tail = (_pos + 1) % QUEUE_SIZE; }
/**