mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 14:38:11 +00:00
AudioServer: Added ability to get count of samples in the buffer queue
Now the AClientConnection can get the count of samples still in the buffer queue.
This commit is contained in:
parent
8bb919d1cc
commit
406aabff23
7 changed files with 28 additions and 0 deletions
|
@ -71,3 +71,12 @@ OwnPtr<AudioServer::EnqueueBufferResponse> ASClientConnection::handle(const Audi
|
|||
m_queue->enqueue(ABuffer::create_with_shared_buffer(*shared_buffer, message.sample_count()));
|
||||
return make<AudioServer::EnqueueBufferResponse>(true);
|
||||
}
|
||||
|
||||
OwnPtr<AudioServer::GetRemainingSamplesResponse> ASClientConnection::handle(const AudioServer::GetRemainingSamples&)
|
||||
{
|
||||
int remaining = 0;
|
||||
if(m_queue)
|
||||
remaining = m_queue->get_remaining_samples();
|
||||
|
||||
return make<AudioServer::GetRemainingSamplesResponse>(remaining);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue