Skip to content

minimum reasonable buffer size on ESP32? #1674

Answered by pschatzmann
haklein asked this question in Q&A
Discussion options

You must be logged in to vote

If my calculation is right: for mono 16 bit at 44100 samples per second, a 1024 bytes buffer leads to a delay of 11 ms.

Studies have shown that sound reflections in an acoustic space must be delayed by 20 to 30 ms before your brain will perceive them as separate.

So a buffer size of 16 does not really make any sense and most likely will not render a clean tone because of the involved overhead. I would start with 1024 bytes and half the values until you get some acceptable result.

Did you measure the effective delay ? I am surprised that you even consider this as an issue....

ps. ADSR is trying to simulate some "instrument". If you are interrested just to output a sine tone, I would recomm…

Replies: 3 comments 8 replies

Comment options

You must be logged in to vote
1 reply
@haklein
Comment options

Answer selected by pschatzmann
Comment options

You must be logged in to vote
4 replies
@haklein
Comment options

@pschatzmann
Comment options

@haklein
Comment options

@haklein
Comment options

Comment options

You must be logged in to vote
3 replies
@haklein
Comment options

@haklein
Comment options

@haklein
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants