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:
parent
a757f3f421
commit
8af97d0ce7
12 changed files with 99 additions and 77 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue