Using url to analog example leaves speaker "bugged" repeating last fragment #693
-
I am using the "Streaming Radio Player" example (https://github.com/pschatzmann/arduino-audio-tools/tree/main/examples/examples-stream/streams-url_mp3-analog) to play a text-to-speech mp3 file from a server, and it's all working almost as expected, except that after the mp3 is finished, the speaker keeps playing the last half-second or so over and over on repeat. Additionally, in the example, "copier.copy();" is just left on the "void loop". Would a
make the code continue after the file stops playing? Or is there another recommended way? The code being used:
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
I am not sure where this would come from. In any case I could never reproduce this myself, so it could be related to your hardware.
|
Beta Was this translation helpful? Give feedback.
-
I added the auto_clear attribute to the config. It might help to set config.auto_clear = true; |
Beta Was this translation helpful? Give feedback.
I am not sure where this would come from. In any case I could never reproduce this myself, so it could be related to your hardware.
There are plenty of options that you can try:
3.1) close the output: analog.end()
3.2) just continue to write silence: output.writeSilence(1024)