Popcorn noise when playing MP3 files #767
-
|
I have built an Bluetooth MP3 music player based on the Cheap Yellow Display (CYD) module. This is the third generation of the player that has been based on ESP32 A2DP. This version also uses the Audio Tools library and the LibHelix library. This player plays MP3 files only and works well for the most part. Unfortunately, the player always starts out playing files correctly but after a few songs it starts producing something like popcorn noise mixed in with the audio being played that will continue when playing song after song. I can change the song being played with on screen buttons and after a couple of advances the new song will again play without the noise. I can then backup to the song where the noise started and it will play correctly so the problem is not in the source material but in the software somewhere. There are no error messages produced just corrupted playback. I have provided a link to my code if anyone wants to try it out. Of course you will have to provide an SD card formatted correctly as mention in the Resource README file. I have three other music players I want to port the code to but I won't until the noise issue is resolved. This is really annoying as I have investigated this issue off and on for over 2 months without success. Thanks you for any help you can provide. [https://craigandheather.net/misc/Lindley_CYD_MusicPlayer2.zip] |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
I should have mentioned that when playback corruption starts besides the popcorn noise I mentioned the audio also has a vibrato effect. Maybe that will help in diagnosing the problem. Also it seems that if I skip forward or backwards 2 songs then the problem goes away until it starts again. Also the corruption only occurs on playback of a new song. It never occur in the middle of a song's playback. I have to believe this has something to do with the MP3 decoder not being cleaned up correctly when one song ends and another begins. |
Beta Was this translation helpful? Give feedback.
I have never encountered anything like this, so I suggest that you try to reproduce your issue with some AudioPlayer examples from the AudioTools project.
If it is working there the issue must be somewhere in your program logic.
You can also try some other mp3 codec...