i2s_event_t.size is always zero from I2S event queue

dave_see
Posts: 11
Joined: Wed Jan 08, 2020 6:02 pm

i2s_event_t.size is always zero from I2S event queue

Postby dave_see » Wed Jan 08, 2020 11:01 pm

Hello,

I have a test application that calls i2s_driver_install with an event queue, per the documentation here:
https://docs.espressif.com/projects/esp ... onfig_tiPv

I set my buffer length to be 2.5 milliseconds at a sample rate of 48kHz. I have confirmed that I receive 400 events per second, which seems correct. These event objects on the queue are of type i2s_event_t, which has two fields:
  • type
  • size
What's strange is that the size field of i2s_event_t is always zero. Is this expected?

Many thanks,
Dave

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

Re: i2s_event_t.size is always zero from I2S event queue

Postby ESP_Sprite » Thu Jan 09, 2020 3:31 am

According to the header that defines it:

Code: Select all

typedef struct {
    i2s_event_type_t    type;   /*!< I2S event type */
    size_t              size;   /*!< I2S data size for I2S_DATA event*/
} i2s_event_t;
As there is no I2S_DATA event (yet), you can ignore this member.

dave_see
Posts: 11
Joined: Wed Jan 08, 2020 6:02 pm

Re: i2s_event_t.size is always zero from I2S event queue

Postby dave_see » Thu Jan 09, 2020 3:39 pm

@ESP_Sprite thank you for posting that this is currently expected behavior.

Who is online

Users browsing this forum: No registered users and 278 guests