mirror of
				https://github.com/esphome/esphome.git
				synced 2025-10-31 07:03:55 +00:00 
			
		
		
		
	Add has_buffered_data() function to ESPADFSpeaker class
This commit is contained in:
		| @@ -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_(); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user