diff options
author | Elyse <kevincristian@outlook.com> | 2021-11-01 19:05:05 -0600 |
---|---|---|
committer | Brian Gianforcaro <b.gianfo@gmail.com> | 2021-12-24 00:19:01 -0800 |
commit | bb747c471f454e794200a2ef536d8e0f4803ba27 (patch) | |
tree | 632e0f8fe7224ea01483c08ab63c0ee57836f291 /Userland/Services/AudioServer/ClientConnection.cpp | |
parent | ce5f5f543fe437a3d0b2aad5f7d1810a9a081eba (diff) | |
download | serenity-bb747c471f454e794200a2ef536d8e0f4803ba27.zip |
AudioServer: Add a 'self_muted' state to each client connection
This new state will allow us to ignore muted clients when computing the
'output mix' in the Mixer.
Diffstat (limited to 'Userland/Services/AudioServer/ClientConnection.cpp')
-rw-r--r-- | Userland/Services/AudioServer/ClientConnection.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/Userland/Services/AudioServer/ClientConnection.cpp b/Userland/Services/AudioServer/ClientConnection.cpp index 5e09395643..825413726e 100644 --- a/Userland/Services/AudioServer/ClientConnection.cpp +++ b/Userland/Services/AudioServer/ClientConnection.cpp @@ -149,4 +149,18 @@ void ClientConnection::set_main_mix_muted(bool muted) { m_mixer.set_muted(muted); } + +Messages::AudioServer::IsSelfMutedResponse ClientConnection::is_self_muted() +{ + if (m_queue) + return m_queue->is_muted(); + + return false; +} + +void ClientConnection::set_self_muted(bool muted) +{ + if (m_queue) + m_queue->set_muted(muted); +} } |