mirror of
https://github.com/esphome/esphome.git
synced 2024-11-14 02:58:11 +01:00
Add has_buffered_data() function to ESPADFSpeaker class
This commit is contained in:
parent
f500bd5e6f
commit
970680b1b2
2 changed files with 4 additions and 0 deletions
|
@ -266,6 +266,8 @@ size_t ESPADFSpeaker::play(const uint8_t *data, size_t length) {
|
||||||
return index;
|
return index;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool ESPADFSpeaker::has_buffered_data() const { return uxQueueMessagesWaiting(this->buffer_queue_) > 0; }
|
||||||
|
|
||||||
} // namespace esp_adf
|
} // namespace esp_adf
|
||||||
} // namespace esphome
|
} // namespace esphome
|
||||||
|
|
||||||
|
|
|
@ -29,6 +29,8 @@ class ESPADFSpeaker : public ESPADFPipeline, public speaker::Speaker, public Com
|
||||||
|
|
||||||
size_t play(const uint8_t *data, size_t length) override;
|
size_t play(const uint8_t *data, size_t length) override;
|
||||||
|
|
||||||
|
bool has_buffered_data() const override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void start_();
|
void start_();
|
||||||
void watch_();
|
void watch_();
|
||||||
|
|
Loading…
Reference in a new issue