1
0
mirror of https://github.com/esphome/esphome.git synced 2025-10-08 12:53:45 +01:00

[i2s_audio] Microphone reads in loop for callbacks shouldn't ever delay (#8625)

This commit is contained in:
Kevin Ahrendt
2025-04-27 18:19:01 -05:00
committed by GitHub
parent adcd6517db
commit e557bca420
2 changed files with 10 additions and 7 deletions

View File

@@ -25,7 +25,8 @@ class I2SAudioMicrophone : public I2SAudioIn, public microphone::Microphone, pub
void set_pdm(bool pdm) { this->pdm_ = pdm; }
size_t read(int16_t *buf, size_t len) override;
size_t read(int16_t *buf, size_t len, TickType_t ticks_to_wait);
size_t read(int16_t *buf, size_t len) override { return this->read(buf, len, pdMS_TO_TICKS(100)); }
#ifdef USE_I2S_LEGACY
#if SOC_I2S_SUPPORTS_ADC