Skip to content

Commit 84f8e31

Browse files
committed
Update shared_bindings_synthio_lfo_tick within audiomixer to use variable sample length.
1 parent b796f0d commit 84f8e31

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

shared-module/audiomixer/Mixer.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ static void mix_down_one_voice(audiomixer_mixer_obj_t *self,
194194
uint32_t n = MIN(MIN(voice->buffer_length, length), SYNTHIO_MAX_DUR * self->channel_count);
195195

196196
// Get the current level from the BlockInput. These may change at run time so you need to do bounds checking if required.
197-
shared_bindings_synthio_lfo_tick(self->sample_rate);
197+
shared_bindings_synthio_lfo_tick(self->sample_rate, n / self->channel_count);
198198
uint16_t level = (uint16_t)(synthio_block_slot_get_limited(&voice->level, MICROPY_FLOAT_CONST(0.0), MICROPY_FLOAT_CONST(1.0)) * (1 << 15));
199199
#else
200200
uint32_t n = MIN(voice->buffer_length, length);

0 commit comments

Comments
 (0)