mirror of
https://github.com/esphome/esphome.git
synced 2024-12-11 16:04:54 +01:00
more clang fixes
This commit is contained in:
parent
f16120ecdd
commit
b80225d1ec
1 changed files with 1 additions and 1 deletions
|
@ -322,7 +322,7 @@ void AudioMixer::mix_audio_samples_without_clipping_(int16_t *media_buffer, int1
|
||||||
|
|
||||||
int16_t q15_scaling_factor = MAX_AUDIO_SAMPLE_VALUE;
|
int16_t q15_scaling_factor = MAX_AUDIO_SAMPLE_VALUE;
|
||||||
|
|
||||||
for (int i = 0; i < samples_to_mix; ++i) {
|
for (size_t i = 0; i < samples_to_mix; ++i) {
|
||||||
int32_t added_sample = static_cast<int32_t>(media_buffer[i]) + static_cast<int32_t>(announcement_buffer[i]);
|
int32_t added_sample = static_cast<int32_t>(media_buffer[i]) + static_cast<int32_t>(announcement_buffer[i]);
|
||||||
|
|
||||||
if ((added_sample > MAX_AUDIO_SAMPLE_VALUE) || (added_sample < MIN_AUDIO_SAMPLE_VALUE)) {
|
if ((added_sample > MAX_AUDIO_SAMPLE_VALUE) || (added_sample < MIN_AUDIO_SAMPLE_VALUE)) {
|
||||||
|
|
Loading…
Reference in a new issue