Page 1 of 1

I2S callback events

Posted: Thu Jan 11, 2024 11:10 pm
by PCRiscV
On my ESP32S3, I am registered a callback function to get my audio data.

I use 32 bit stereo at 48 kHz, with 10 ms blocks. The size member of the i2s_event_data_t structure is always 3840 which is 480*2*4. This is good.

I do not understand the data pointer. When I dump what is pointed to by data assuming int32, I get the following:

1070279392 1070260076 3840 -104644608 0 -104595456 0 -104529920

data[0] and data[1] appears to be pointers into a circular buffer and data[1]-data[0] is always 3844 which seems reasonable. data[3] and on appears to be audio. I am only using the left channels so the right channel is always 0.

How to I get my audio? I tried different things and I am getting audio but there are few glitches. Is data[0] the pointer to the audio buffer?

Thanks

Re: I2S callback events

Posted: Fri Jan 12, 2024 3:43 am
by ESP_Sprite
What ESP-IDF version are you using?

Re: I2S callback events

Posted: Fri Jan 12, 2024 11:55 am
by PCRiscV
v5.0.2