12 #include <esp_http_client.h> 33 AudioReader(
size_t buffer_size) : buffer_size_(buffer_size) {}
39 esp_err_t add_sink(
const std::weak_ptr<RingBuffer> &output_ring_buffer);
45 esp_err_t start(
const std::string &uri,
AudioFileType &file_type);
59 static esp_err_t http_event_handler(esp_http_client_event_t *evt);
64 static AudioFileType get_audio_type(
const char *content_type);
71 void cleanup_connection_();
76 esp_http_client_handle_t client_{
nullptr};
80 const uint8_t *file_current_{
nullptr};
AudioReader(size_t buffer_size)
Constructs an AudioReader object.
std::unique_ptr< AudioSinkTransferBuffer > output_transfer_buffer_
uint32_t no_data_read_count_
std::shared_ptr< RingBuffer > file_ring_buffer_
Implementation of SPI Controller mode.