pschatzmann/arduino-libhelix — reverse-engineered prompt
Reverse engineered prompt
Build me an Arduino audio decoding library that wraps the Helix MP3 and AAC decoders so it’s easy to use on microcontrollers. I want someone to be able to feed it MP3 or AAC data and get back 16 bit PCM audio, either written to an Arduino Stream like I2S or sent to a callback they can handle themselves.
Please include simple examples that show decoding an MP3 buffer, printing samples to Serial, and restarting playback. It should work as a normal Arduino library, but also be buildable on a desktop with CMake for testing.
Make the library practical for ESP32 style boards too, including support for allocating buffers in PSRAM when available. Let users adjust frame and PCM buffer sizes for high bitrate files, and include a simple log level setting. Please also document that metadata should be filtered before decoding, because bad MP3 metadata can crash decoders.
Keep the API small and friendly, with clear class docs and examples for MP3 and AAC.
Want more depth? Deep Reverse