Laggy output when mixing multiple mp3 #1885
-
Hi, I am trying to mix multiple mp3 files together and play them. Unfortunately, after some struggle the audio that came from speaker is laggy. My question is if is there anybody with same experience and know if I do something wrong or if this is a limitation of ESP32 witch iam using? When I play just one track (removing anything ending in 2 and 3), the lag is not there. My thesis is that these 3 tracks are switched on and off in loop but I don't know anymore what do differently. This is my code running on ESP322 with external TAS5825M DAC.
I hope for any help or suggestion on what to try. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
I am surprised that you don't run out of RAM since the mp3 decoder needs quite a bit of it. Another theory would be that the sequential decoding would be adding to the lag. You can try to replace the mp3 with wav: if it is improving then the issue is rather the decoding, if it is getting worse, the issue is the data access.... |
Beta Was this translation helpful? Give feedback.
I am surprised that you don't run out of RAM since the mp3 decoder needs quite a bit of it.
I bet you are stressing out the SD drive with your logic: try to measure the impact on what you are doing!
Another theory would be that the sequential decoding would be adding to the lag. You can try to replace the mp3 with wav: if it is improving then the issue is rather the decoding, if it is getting worse, the issue is the data access....