We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent be48374 commit 3c97fd8Copy full SHA for 3c97fd8
ports/raspberrypi/common-hal/audiobusio/I2SIn.c
@@ -301,8 +301,9 @@ audioio_get_buffer_result_t audiobusio_i2sin_get_buffer(audiobusio_i2sin_obj_t *
301
302
// TODO: single_channel_output
303
304
- if (!audio_dma_has_buffer(&self->dma)) {
305
- return GET_BUFFER_ERROR;
+ // Do other things while we wait for the buffer to fill.
+ while (!audio_dma_has_buffer(&self->dma)) {
306
+ RUN_BACKGROUND_TASKS;
307
}
308
309
*buffer_length = self->buffer_size;
0 commit comments