mirror of
https://github.com/genodelabs/genode.git
synced 2025-01-31 08:25:38 +00:00
parent
d8b95c263b
commit
83e5a64864
@ -177,6 +177,21 @@ class Audio_out::Stream
|
||||
*/
|
||||
unsigned tail() const { return _tail; }
|
||||
|
||||
/**
|
||||
* Number of packets between playback and allocation position
|
||||
*
|
||||
* \return number
|
||||
*/
|
||||
unsigned queued() const
|
||||
{
|
||||
if (_tail > _pos)
|
||||
return _tail - _pos;
|
||||
else if (_pos > _tail)
|
||||
return QUEUE_SIZE - (_pos - _tail);
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve next packet for given packet
|
||||
*
|
||||
|
Loading…
x
Reference in New Issue
Block a user