mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 00:07:36 +00:00
AudioServer: Mixer: limit max volume to 100
This commit is contained in:
parent
ee548ca5b9
commit
b9bbf377d6
1 changed files with 4 additions and 1 deletions
|
@ -131,7 +131,10 @@ void Mixer::mix()
|
||||||
|
|
||||||
void Mixer::set_main_volume(int volume)
|
void Mixer::set_main_volume(int volume)
|
||||||
{
|
{
|
||||||
m_main_volume = volume;
|
if (volume > 100)
|
||||||
|
m_main_volume = 100;
|
||||||
|
else
|
||||||
|
m_main_volume = volume;
|
||||||
ClientConnection::for_each([volume](ClientConnection& client) {
|
ClientConnection::for_each([volume](ClientConnection& client) {
|
||||||
client.did_change_main_mix_volume({}, volume);
|
client.did_change_main_mix_volume({}, volume);
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue