Skip to content

Commit fd8567b

Browse files
committed
Fix explicit cast.
1 parent e3e90de commit fd8567b

File tree

1 file changed

+2
-2
lines changed
  • shared-module/audiodelays

1 file changed

+2
-2
lines changed

shared-module/audiodelays/Echo.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -452,8 +452,8 @@ audioio_get_buffer_result_t audiodelays_echo_get_buffer(audiodelays_echo_obj_t *
452452
}
453453
}
454454

455-
word = (sample_word * MIN(MICROPY_FLOAT_CONST(2.0) - mix, MICROPY_FLOAT_CONST(1.0)))
456-
+ (echo * MIN(mix, MICROPY_FLOAT_CONST(1.0)));
455+
word = (int32_t)((sample_word * MIN(MICROPY_FLOAT_CONST(2.0) - mix, MICROPY_FLOAT_CONST(1.0)))
456+
+ (echo * MIN(mix, MICROPY_FLOAT_CONST(1.0))));
457457
word = synthio_mix_down_sample(word, SYNTHIO_MIX_DOWN_SCALE(2));
458458

459459
if (MP_LIKELY(self->bits_per_sample == 16)) {

0 commit comments

Comments
 (0)