Replies: 4 comments 3 replies
-
That just sets the amount of RAM that's allocated for buffering input streams. The way I2S works is it fills up
Rough guesstimate, I'd use something like 32 or 64 for |
Beta Was this translation helpful? Give feedback.
-
Thanks for your help! Is there a way to call a read command to load the I2S buffer without using interrupts? ` if (result == ESP_OK) |
Beta Was this translation helpful? Give feedback.
-
Does the bool available() wait for the buffer to fill before becoming
true? The example you linked doesn't set the I2S buffer.
…On Fri, Feb 23, 2024, 12:05 Earle F. Philhower, III < ***@***.***> wrote:
Sure, you don't have to use the onReceive callback and can just use
something like
while (audio.available()) {
int16_t l, r;
audio.read16(&l, &r);
/* process... */
}
See the example here
<https://github.com/earlephilhower/arduino-pico/blob/master/libraries/I2S/examples/I2SInput/I2SInput.ino>
.
—
Reply to this email directly, view it on GitHub
<#2018 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AB5LB7SWNSWC3DMJ57J4COLYVDK6FAVCNFSM6AAAAABDV6IZ7WVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4DKNZRGQ4TM>
.
You are receiving this because you authored the thread.Message ID:
***@***.***
.com>
|
Beta Was this translation helpful? Give feedback.
-
Would you please explain the Boolean returned by an I2S read statement like: read16(...). As per the I2S.h file: "Read samples from I2S port, will block until data available", so this would indicate that the returned Boolean does not mean data available. |
Beta Was this translation helpful? Give feedback.
-
Hello Earle, Thank you for your great work here.
Can you explain the use of the setBuffers function used for I2S Input? I am currently working with a single microphone (mono). I've searched for an example or documentation which explains how to use this function parameters but have thus far been unsuccessful in finding one. Maybe you could share an example?
setBuffers(size_t buffers, size_t bufferWords, int32_t silenceSample = 0);
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions