My setup: I have an ESP32-S3 with two tasks, with one task getting audio data from various sources, and the other task writing to an i2s DAC. The two tasks communicate audio data through a ring buffer. This works fine with 99% of URL streams and MP3 files, but very occasionally, I will get a glitch and my second decoder writer task will fail to reset the watchdog and cause a reset.
Please excuse me I have only been learning C++ for the past 2 years. but I think I have traced the issue down to the following function:
Changing the "pos < 0" to "pos <= 0" fixed the issue and I had no more lockups. Maybe this is something you're aware of already, I don't know. I'm not familiar enough with your library, maybe there's a reason it's like that? I also don't know if this "fix" breaks anything else, I just know it's working for me.
Thank you for your time and thank you for the Arduino Audio Tools library, I think it's a very good library.
Hello!
My setup: I have an ESP32-S3 with two tasks, with one task getting audio data from various sources, and the other task writing to an i2s DAC. The two tasks communicate audio data through a ring buffer. This works fine with 99% of URL streams and MP3 files, but very occasionally, I will get a glitch and my second decoder writer task will fail to reset the watchdog and cause a reset.
Please excuse me I have only been learning C++ for the past 2 years. but I think I have traced the issue down to the following function:
I noticed that "pos" never gets tested for when it's actually zero, and so I modified the function like so:
Changing the "pos < 0" to "pos <= 0" fixed the issue and I had no more lockups. Maybe this is something you're aware of already, I don't know. I'm not familiar enough with your library, maybe there's a reason it's like that? I also don't know if this "fix" breaks anything else, I just know it's working for me.
Thank you for your time and thank you for the Arduino Audio Tools library, I think it's a very good library.