mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-14 21:42:19 +00:00
AudioServer: Mixer: limit max volume to 100
This commit is contained in:
parent
ee548ca5b9
commit
b9bbf377d6
Notes:
sideshowbarker
2024-07-19 01:59:31 +09:00
Author: https://github.com/bcoles
Commit: b9bbf377d6
Pull-request: https://github.com/SerenityOS/serenity/pull/4230
1 changed files with 4 additions and 1 deletions
|
@ -131,7 +131,10 @@ void Mixer::mix()
|
|||
|
||||
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) {
|
||||
client.did_change_main_mix_volume({}, volume);
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue