diff --git a/repos/os/include/audio_out_session/audio_out_session.h b/repos/os/include/audio_out_session/audio_out_session.h index a5f57437de..c1d00e25d1 100644 --- a/repos/os/include/audio_out_session/audio_out_session.h +++ b/repos/os/include/audio_out_session/audio_out_session.h @@ -252,8 +252,8 @@ class Audio_out::Stream { if (full()) throw Alloc_failed(); - unsigned pos = _tail; + _tail = (_tail + 1) % QUEUE_SIZE; Packet *p = get(pos); @@ -267,7 +267,7 @@ class Audio_out::Stream * * This means that allocation will start at current queue position. */ - void reset() { _tail = (_pos + 1) % QUEUE_SIZE; } + void reset() { _tail = _pos; } /**