Re: ESP32 Webradio
Posted: Fri Sep 22, 2017 8:40 am
Its for sending audio to the ESP32. Whats your use case for doing it the other way round?
Code: Select all
Toshiba@Michael MINGW32 /c/esp/mp3
$ make
CC build/playlist/playlist.o
C:/esp/mp3/components/playlist/playlist.c:19:17: fatal error: ini.h: No such file or directory
compilation terminated.
make[1]: *** [/c/esp/esp-idf/make/component_wrapper.mk:243: playlist.o] Fehler 1
make: *** [C:/esp/esp-idf/make/project.mk:421: component-playlist-build] Fehler 2
Code: Select all
cd ~/esp
git clone https://github.com/espressif/esp-idf.git esp-idf-v5.2.0
cd esp-idf-v5.2.0/
git checkout v5.2.0
git submodule update --init --recursive
Code: Select all
git checkout v5.2.0
Code: Select all
git submodule init && git submodule update
Code: Select all
git clone https://github.com/espressif/esp-idf.git esp-idf-v5.2.0
Code: Select all
static void init_i2s(renderer_config_t *config)
{
i2s_mode_t mode = I2S_MODE_SLAVE | I2S_MODE_TX;
Code: Select all
const char samp32[4] = {ptr_l[0], ptr_l[1], ptr_r[0], ptr_r[1]};
bytes_pushed = i2s_push_sample(renderer_instance->i2s_num, (const char*) &samp32, max_wait);
Code: Select all
const char samp64[8] = {0, 0, ptr_l[0], ptr_l[1], 0, 0, ptr_r[0], ptr_r[1]};
bytes_pushed = i2s_push_sample(renderer_instance->i2s_num, (const char*) &samp64, max_wait);
Code: Select all
// takes too long
i2s_event_t evt = {0};
if(xQueueReceive(i2s_event_queue, &evt, 0)) {
if(evt.type == I2S_EVENT_TX_DONE) {
ESP_LOGE(TAG, "DMA Buffer Underflow");
}
}