mirror of
https://github.com/mmueller41/genode.git
synced 2026-01-21 12:32:56 +01:00
audio_out_session: reset changes to 'pos = tail'
In case a driver is waiting for data, is should only investigate 'pos'. It should not advance the ring in any way until there is data available. issue #4609
This commit is contained in:
committed by
Norman Feske
parent
907641f6ea
commit
e0c4d5068d
@@ -252,8 +252,8 @@ class Audio_out::Stream
|
|||||||
{
|
{
|
||||||
if (full())
|
if (full())
|
||||||
throw Alloc_failed();
|
throw Alloc_failed();
|
||||||
|
|
||||||
unsigned pos = _tail;
|
unsigned pos = _tail;
|
||||||
|
|
||||||
_tail = (_tail + 1) % QUEUE_SIZE;
|
_tail = (_tail + 1) % QUEUE_SIZE;
|
||||||
|
|
||||||
Packet *p = get(pos);
|
Packet *p = get(pos);
|
||||||
@@ -267,7 +267,7 @@ class Audio_out::Stream
|
|||||||
*
|
*
|
||||||
* This means that allocation will start at current queue position.
|
* This means that allocation will start at current queue position.
|
||||||
*/
|
*/
|
||||||
void reset() { _tail = (_pos + 1) % QUEUE_SIZE; }
|
void reset() { _tail = _pos; }
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user