mirror of
https://github.com/esphome/esphome.git
synced 2025-01-18 20:10:55 +00:00
Add has_buffered_data() function to ESPADFSpeaker class
This commit is contained in:
parent
f500bd5e6f
commit
970680b1b2
@ -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…
x
Reference in New Issue
Block a user