#ifndef _SOUND_H #define _SOUND_H #include "Arduino.h" #include "driver/i2s.h" #include "hardware.h" class Sound { public: Sound(); void init(); void end(); // void close(); // bool play(); // void pause(); // void stop(); int render_sample_block(uint16_t *sample_buf_left, uint16_t *sample_buf_right, int num_samples); static const i2s_port_t i2s_num = (i2s_port_t)I2S_NUM; static void play_task(void *pvParameter); private: TaskHandle_t xTaskRefillBuffer; }; #endif /* _SOUND_H */