Skip to content

Commit 9a148f7

Browse files
committed
Temp mix test
1 parent d2173ae commit 9a148f7

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

shared-module/audiodelays/Reverb.c

+2
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,7 @@ audioio_get_buffer_result_t audiodelays_reverb_get_buffer(audiodelays_reverb_obj
273273
mp_float_t damp = synthio_block_slot_get_limited(&self->damp, MICROPY_FLOAT_CONST(0.0), MICROPY_FLOAT_CONST(1.0));
274274
int16_t damp1, damp2;
275275
audiodelays_reverb_get_damp_fixedpoint(damp, &damp1, &damp2);
276+
mp_float_t mix = synthio_block_slot_get_limited(&self->mix, MICROPY_FLOAT_CONST(0.0), MICROPY_FLOAT_CONST(1.0));
276277

277278
mp_float_t roomsize = synthio_block_slot_get_limited(&self->roomsize, MICROPY_FLOAT_CONST(0.0), MICROPY_FLOAT_CONST(1.0));
278279
int16_t feedback = audiodelays_reverb_get_roomsize_fixedpoint(roomsize);
@@ -321,6 +322,7 @@ audioio_get_buffer_result_t audiodelays_reverb_get_buffer(audiodelays_reverb_obj
321322

322323
word = output * 30;
323324

325+
word = (sample_word * (MICROPY_FLOAT_CONST(1.0) - mix)) + (word * mix);
324326
word = synthio_mix_down_sample(word, SYNTHIO_MIX_DOWN_SCALE(2));
325327
word_buffer[i] = (int16_t)word;
326328

0 commit comments

Comments
 (0)