mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 03:37:34 +00:00
AudioServer: Expose the ability to get and set the sample rate
Two new IPC calls allow audio clients to get and set the sample rate. The AudioServer calls into the new ioctl of the sound card.
This commit is contained in:
parent
d0ceaa24a6
commit
9880a5c481
5 changed files with 38 additions and 0 deletions
|
@ -63,6 +63,16 @@ void ClientConnection::set_main_mix_volume(i32 volume)
|
|||
m_mixer.set_main_volume(volume);
|
||||
}
|
||||
|
||||
Messages::AudioServer::GetSampleRateResponse ClientConnection::get_sample_rate()
|
||||
{
|
||||
return { m_mixer.audiodevice_get_sample_rate() };
|
||||
}
|
||||
|
||||
void ClientConnection::set_sample_rate(u16 sample_rate)
|
||||
{
|
||||
m_mixer.audiodevice_set_sample_rate(sample_rate);
|
||||
}
|
||||
|
||||
Messages::AudioServer::EnqueueBufferResponse ClientConnection::enqueue_buffer(Core::AnonymousBuffer const& buffer, i32 buffer_id, int sample_count)
|
||||
{
|
||||
if (!m_queue)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue