esp32 soundboard project
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

27 lines
501 B

#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();
void play(const char*);
// void pause();
// void stop();
static const i2s_port_t i2s_num = (i2s_port_t)I2S_NUM;
static void play_task(void *pvParameter);
static Sound* getInstance();
private:
TaskHandle_t xTaskSound = NULL;
static Sound* instance;
};
#endif /* _SOUND_H */