1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 18:18:12 +00:00

Audio: Fix code smells and issues found by static analysis

This fixes all current code smells, bugs and issues reported by
SonarCloud static analysis. Other issues are almost exclusively false
positives. This makes much code clearer, and some minor benefits in
performance or bug evasion may be gained.
This commit is contained in:
kleines Filmröllchen 2021-11-15 22:27:28 +01:00 committed by Linus Groh
parent a757f3f421
commit 8af97d0ce7
12 changed files with 99 additions and 77 deletions

View file

@ -114,7 +114,7 @@ void Mixer::mix()
// Even though it's not realistic, the user expects no sound at 0%.
if (m_main_volume < 0.01)
mixed_sample = { 0 };
mixed_sample = Audio::Sample { 0 };
else
mixed_sample.log_multiply(m_main_volume);
mixed_sample.clip();