I2S callback events

PCRiscV
Posts: 11
Joined: Thu Jan 04, 2024 3:57 pm

I2S callback events

Postby PCRiscV » Thu Jan 11, 2024 11:10 pm

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

ESP_Sprite
Posts: 9764
Joined: Thu Nov 26, 2015 4:08 am

Re: I2S callback events

Postby ESP_Sprite » Fri Jan 12, 2024 3:43 am

What ESP-IDF version are you using?

PCRiscV
Posts: 11
Joined: Thu Jan 04, 2024 3:57 pm

Re: I2S callback events

Postby PCRiscV » Fri Jan 12, 2024 11:55 am

v5.0.2

Who is online

Users browsing this forum: No registered users and 85 guests