Skip to content

Commit 8c40c56

Browse files
committed
Move shared_bindings_synthio_lfo_tick to avoid error if using unsigned 16-bit audio.
1 parent d84cdbc commit 8c40c56

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

shared-module/audiofilters/Filter.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,10 @@ audioio_get_buffer_result_t audiofilters_filter_get_buffer(audiofilters_filter_o
275275
}
276276

277277
if (self->sample == NULL) {
278+
// tick all block inputs
279+
shared_bindings_synthio_lfo_tick(self->sample_rate, length / self->channel_count);
280+
(void)synthio_block_slot_get(&self->mix);
281+
278282
if (self->samples_signed) {
279283
memset(word_buffer, 0, length * (self->bits_per_sample / 8));
280284
} else {
@@ -289,10 +293,6 @@ audioio_get_buffer_result_t audiofilters_filter_get_buffer(audiofilters_filter_o
289293
}
290294
}
291295

292-
// tick all block inputs
293-
shared_bindings_synthio_lfo_tick(self->sample_rate, length / self->channel_count);
294-
(void)synthio_block_slot_get(&self->mix);
295-
296296
length = 0;
297297
} else {
298298
// we have a sample to play and filter

0 commit comments

Comments
 (0)