nrf: I2SOut: deal more gracefully with errors from the sample

This commit is contained in:
jepler 2019-09-08 21:58:04 -05:00
parent b613a50d8c
commit ccf08aa3df
1 changed files with 4 additions and 0 deletions

View File

@ -140,6 +140,10 @@ stopping: ;
goto stopping;
}
}
if (get_buffer_result == GET_BUFFER_ERROR || sample_buffer_length == 0) {
self->stopping = true;
goto stopping;
}
}
uint16_t bytecount = MIN(bytesleft, (size_t)(self->sample_end - self->sample_data));
if (self->samples_signed) {