ESP32_VS1053_Stream icon indicating copy to clipboard operation
ESP32_VS1053_Stream copied to clipboard

How to use an existing buffer

Open lidense opened this issue 6 months ago • 3 comments

Hi, I have used your app to listen to some radios and works great. Now I have developed a small app that provides a buffer in a loop with some aac audio data in chunks of about 1600 bytes coming from an decoded HLS stream. The buffer has this format: uint8 * data. I can play the data using Adafruit VS1053 library with this code if(vs_player.readyForData()) vs_player.playData(data,read); but the sound is hashed and sometimes some bits are skipped. I thought that using a circular buffer like esp32 Stream vs1053 might be better but I don't see how to feed the data to the stream. I see that the main function stream.connectTohost is used to create a stream from a website, how can I instead feed by data buffer to the stream and get it played from vs1053? Thanks for your help.

lidense avatar Dec 13 '23 10:12 lidense