Skip to content
Discussion options

You must be logged in to vote

The overall processing logic is quite simple: The sine generator is an asynchonous data source, so it provides the data as fast as possible. The max generation speed is thus mainly driven by the selected implementation.

The ESP32 I2S API has a configurable DMA buffer that is filled when you write data to I2S: I am using a blocking implementation that waits until there is enough space in the buffer to write the data, if the buffer is full.

One variable of optimization is the write size: I am usally using 1024 bytes. The smaller the size, the bigger the overhead but also the bigger the chance that the buffer remains full.

The sound output is generated from this buffer, so the bigger the buf…

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
2 replies
@bjoerngiesler
Comment options

@bjoerngiesler
Comment options

Answer selected by pschatzmann
Comment options

You must be logged in to vote
0 replies
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