Encapsulated all parts with #ifdef that will not compile on newer ESP32 variants.
It's still a long way to go before we have a working version on -S3 and -C3, bus this should help to get us started.
From MoonModule/WLED repo.
- the connected() method only get called once a Wifi STA connection is established. UDP Sound Sync should also work when sender is in AP Mode.
- added a few comments that should help to understand the code structure.
- Info Page: add a small horizontal line below usermod specific part. Improves readability.
- updated 2D mapping mode of some 1D soundreactive effects
- alllow some effects to fade slowly, even slower that possible with SEGMENT.fade_out(). Looks nice.
not sure why - most effects only fade when using SEGMENT.fade_out(), while some need SEGMENT.fadeToBlackBy().
- Un-F() most segment JSON keys, decreases JSON doc usage by 47 B (increases static RAM usage by 32 B),
makes `extractModeDefaults` work without strstr_P
- Removed String from serializeModeData and serializeModeNames
- Set 0.14 version name "Hoshi"
- save 1K of RAM by optimizing out
fftBin[].
- moved several copies of the peak reset code into a single function
- moved peak detection out of getSample().
- call peak detection function as last step of FFTcode. More optimal, and we can be sure that fresh FFT result are available.
Peak detection/reset are now called from both tasks, so I had to move some peak-related vars out of AudioReactive class and make them global (static).
also when user wants less than 16 bands.
Previously when users selected fewer bands (like 4 instead of 16), only the lowest freq channels were displayed.
- put variables with same context next to each other.
- removed a few vars that are not needed any more.
- replaced "16" by a more descriptive constant