5 #include "../i2s_audio.h" 7 #include <driver/i2s.h> 8 #include <freertos/FreeRTOS.h> 9 #include <freertos/queue.h> 19 static const size_t BUFFER_SIZE = 1024;
37 uint8_t data[BUFFER_SIZE];
44 void setup()
override;
49 #if SOC_I2S_SUPPORTS_DAC 54 void start()
override;
56 void finish()
override;
58 size_t play(
const uint8_t *data,
size_t length)
override;
60 bool has_buffered_data()
const override;
64 void stop_(
bool wait_on_empty);
67 static void player_task(
void *params);
69 TaskHandle_t player_task_handle_{
nullptr};
75 bool task_created_{
false};
77 #if SOC_I2S_SUPPORTS_DAC 78 i2s_dac_mode_t internal_dac_mode_{I2S_DAC_CHANNEL_DISABLE};
void set_timeout(uint32_t ms)
void set_i2s_comm_fmt(i2s_comm_format_t mode)
const float LATE
For components that should be initialized at the very end of the setup process.
QueueHandle_t buffer_queue_
BedjetMode mode
BedJet operating mode.
QueueHandle_t event_queue_
float get_setup_priority() const override
void set_dout_pin(uint8_t pin)
Implementation of SPI Controller mode.
void set_internal_dac_mode(i2s_dac_mode_t mode)
i2s_comm_format_t i2s_comm_fmt_