mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-10 18:19:03 +00:00
Audio: Change how volume works
Across the entire audio system, audio now works in 0-1 terms instead of 0-100 as before. Therefore, volume is now a double instead of an int. The master volume of the AudioServer changes smoothly through a FadingProperty, preventing clicks. Finally, volume computations are done with logarithmic scaling, which is more natural for the human ear. Note that this could be 4-5 different commits, but as they change each other's code all the time, it makes no sense to split them up.
This commit is contained in:
parent
2909c3a931
commit
152ec28da0
Notes:
sideshowbarker
2024-07-18 04:05:04 +09:00
Author: https://github.com/kleinesfilmroellchen
Commit: 152ec28da0
Pull-request: https://github.com/SerenityOS/serenity/pull/9610
Reviewed-by: https://github.com/Hendiadyoin1
Reviewed-by: https://github.com/awesomekling
Reviewed-by: https://github.com/bugaevc
Reviewed-by: https://github.com/joebentley
Reviewed-by: https://github.com/nooga
Reviewed-by: https://github.com/sunverwerth
14 changed files with 190 additions and 45 deletions
|
@ -48,7 +48,7 @@ void ClientConnection::muted_state_changed(bool muted)
|
|||
on_muted_state_change(muted);
|
||||
}
|
||||
|
||||
void ClientConnection::main_mix_volume_changed(i32 volume)
|
||||
void ClientConnection::main_mix_volume_changed(double volume)
|
||||
{
|
||||
if (on_main_mix_volume_change)
|
||||
on_main_mix_volume_change(volume);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue