mirror of
https://github.com/esphome/esphome.git
synced 2024-11-12 18:27:46 +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;
|
||||
}
|
||||
|
||||
bool ESPADFSpeaker::has_buffered_data() const { return uxQueueMessagesWaiting(this->buffer_queue_) > 0; }
|
||||
|
||||
} // namespace esp_adf
|
||||
} // 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;
|
||||
|
||||
bool has_buffered_data() const override;
|
||||
|
||||
protected:
|
||||
void start_();
|
||||
void watch_();
|
||||
|
|
Loading…
Reference in a new issue