mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-20 16:28:54 +00:00
AudioServer: Stop glitching when toggling mute
Initialize the `AudioServer::Mixer::m_zero_filled_buffer` to zero. The garbage memory inside that buffer was causing a glitch sound when the user was toggling the mute checkbox or was moving the volume slider on and off zero. Glitching was more obvious if the toggling was happening without any sound being played in parallel. In addition to that, the `m_zero_filled_buffer` turned to `const` since there is no intention to modify its content.
This commit is contained in:
parent
9baa521b04
commit
b22c840963
Notes:
sideshowbarker
2024-07-17 07:31:31 +09:00
Author: https://github.com/achronop
Commit: b22c840963
Pull-request: https://github.com/SerenityOS/serenity/pull/16003
Reviewed-by: https://github.com/kleinesfilmroellchen ✅
1 changed files with 1 additions and 1 deletions
|
@ -133,7 +133,7 @@ private:
|
|||
NonnullRefPtr<Core::ConfigFile> m_config;
|
||||
RefPtr<Core::Timer> m_config_write_timer;
|
||||
|
||||
Array<u8, HARDWARE_BUFFER_SIZE_BYTES> m_zero_filled_buffer;
|
||||
Array<u8, HARDWARE_BUFFER_SIZE_BYTES> const m_zero_filled_buffer {};
|
||||
|
||||
void mix();
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue