8000 Fix explicit type conversion error. · unwiredben/circuitpython@3c17a1e · GitHub
[go: up one dir, main page]

Skip to content

Commit 3c17a1e

Browse files
committed
Fix explicit type conversion error.
1 parent 14d455f commit 3c17a1e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

shared-module/audiodelays/MultiTapDelay.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,7 @@ audioio_get_buffer_result_t audiodelays_multi_tap_delay_get_buffer(audiodelays_m
400400
for (size_t j = 0; j < self->tap_len; j++) {
401401
tap_pos = (delay_buffer_pos + delay_buffer_len - self->tap_offsets[j]) % delay_buffer_len;
402402
delay_word = delay_buffer[tap_pos + delay_buffer_offset];
403-
word += delay_word * self->tap_levels[j];
403+
word += (int32_t)(delay_word * self->tap_levels[j]);
404404
}
405405

406406
if (self->tap_len > 1) {
@@ -417,7 +417,7 @@ audioio_get_buffer_result_t audiodelays_multi_tap_delay_get_buffer(audiodelays_m
417417
}
418418

419419
// Apply decay and add sample
420-
delay_word = (int32_t)(delay_word * decay + sample_word);
420+
delay_word = (int32_t)(delay_word * decay) + sample_word;
421421

422422
if (MP_LIKELY(self->base.bits_per_sample == 16)) {
423423
delay_word = synthio_mix_down_sample(delay_word, SYNTHIO_MIX_DOWN_SCALE(2));

0 commit comments

Comments
 (0)
0