mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-19 21:57:55 +00:00
os: add invalidate_all packets to Audio_out
When a stream was stopped it may still contain valid packets that will be played automatically when the stream is started again. The invalidate_all() method may be called after stopping the stream to prevent this. Issue #1647.
This commit is contained in:
parent
e8c9125d9f
commit
a6c5716796
@ -244,6 +244,16 @@ class Audio_out::Stream
|
||||
void reset() { _tail = _pos; }
|
||||
|
||||
|
||||
/**
|
||||
* Invalidate all packets in stream queue
|
||||
*/
|
||||
void invalidate_all()
|
||||
{
|
||||
for (int i = 0; i < QUEUE_SIZE; i++)
|
||||
_buf[i]._valid = false;
|
||||
}
|
||||
|
||||
|
||||
/**********************************************
|
||||
** Intended to be called by the server side **
|
||||
***********************************************/
|
||||
|
Loading…
Reference in New Issue
Block a user