Repository navigation
examples/Mic_FFT: pace drawing by captured audio, build on PC - #407
Merged
Merged
Conversation
loop() advanced one drawing step whenever two recording requests were queued, whether or not new audio had arrived. The history row scrolls once per five steps, so its speed depended on how fast the display draws: on the PC build it scrolled hundreds of rows per second over the same data. A drawing cycle now starts only after a new block has been queued, which limits the history to the capture rate; a display slower than that is unaffected. Also use decltype instead of the GNU typeof extension, and malloc / free instead of heap_caps_* outside ESP_PLATFORM, so the example builds as is on the PC (SDL) build.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pace the Mic_FFT drawing by the captured audio
loop()advanced one drawing step whenever two recording requests were queued, whether or not new audio had arrived. The history row scrolls once per five steps, so its speed depended on how fast the display draws. On the PC (SDL) build it scrolled hundreds of rows per second over the same data.Build the example on PC
decltypeinstead of the GNUtypeofextension, andmalloc/freeinstead ofheap_caps_*outsideESP_PLATFORM, so the example builds as is with the native (SDL) build.Testing