mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 23:37:35 +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
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