1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 18:37:35 +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

@ -8,7 +8,7 @@
namespace Audio {
WavWriter::WavWriter(StringView path, int sample_rate, int num_channels, int bits_per_sample)
WavWriter::WavWriter(StringView path, int sample_rate, u16 num_channels, u16 bits_per_sample)
: m_sample_rate(sample_rate)
, m_num_channels(num_channels)
, m_bits_per_sample(bits_per_sample)
@ -16,7 +16,7 @@ WavWriter::WavWriter(StringView path, int sample_rate, int num_channels, int bit
set_file(path);
}
WavWriter::WavWriter(int sample_rate, int num_channels, int bits_per_sample)
WavWriter::WavWriter(int sample_rate, u16 num_channels, u16 bits_per_sample)
: m_sample_rate(sample_rate)
, m_num_channels(num_channels)
, m_bits_per_sample(bits_per_sample)