Timeline for I2S read() is which channel?
Current License: CC BY-SA 4.0
7 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
May 19, 2021 at 12:23 | vote | accept | pm101 | ||
May 19, 2021 at 12:21 | comment | added | pm101 | thanks for the help - you've certainly understood the problem and it is worth recording (no pun intended) for others to know about. For now as my project only requires one channel I can simply put split the one channel into both left and right so that in this case it doesn't matter and I will always read the same channel regardless, however that's just a sticking plaster. | |
May 19, 2021 at 12:14 | comment | added | Majenko |
I think part of the problem is that the whole library's methodology is flawed. You hjave DMA driven ping-pong buffers which receive the data constantly, and you must deal with an entire buffer in less time that it takes to fill the other buffer. You may be better off using the onReceive() callback to run a function at the moment the buffers swap, at which point you must read the entirety of the buffer, otherwise it will stall (by the looks of things).
|
|
May 19, 2021 at 12:08 | comment | added | pm101 | Thanks, I have tested this however occasionally I am getting all LEFT and sometimes all RIGHT on pair[0] depending when I start reading. which is my main problem | |
May 19, 2021 at 11:35 | comment | added | Majenko | Your always dealing with an entire dma buffer, so should always be the same. | |
May 19, 2021 at 11:13 | comment | added | pm101 | Thanks. It helps, however using this method would there not still be a possibility that the channels may be swapped? Will this ensure that the first member of the pair is always the LEFT or RIGHT (e.g.)? I find that the Arduino documentation, library and examples are extremely lacking with this regard and to my astonishment does not seem to concern most folk in the community | |
May 19, 2021 at 11:01 | history | answered | Majenko | CC BY-SA 4.0 |