Home Forums Sparkfun MP3 Shield Library Support Forum Occasional Pops/Glitches Reply To: Occasional Pops/Glitches



You can try to increase the SFEMP3Shield::mp3DataBuffer from 32 to larger values. The minimum needs to be 32.  http://mpflaga.github.io/Sparkfun-MP3-Player-Shield-Arduino-Library/class_s_f_e_m_p3_shield.html#ab1027c13d5feef5d3b928f4d53e1f602

hmm, “pop or glitch”… is odd. The MP3 file is frame of packets. There should not be glitches. It has been my experience if there is a lack of real time (too busy doing other things) then there are short pauses of silence, until the buffers catch up and resume playing. pops are an indication of lost data.

FYI, the SdFat library reads the Card in chunks of 500 Bytes at a time in to local cache of RAM. and refills that as it needs to. And reads the next 32 it will send to the 1053. Where the 1053’s buffer is 32. So sending more may exceed the 1053’s buffer and sending less may cause more cycles to fill the 1053. But it is simple enough to try and mess with.

I would be more suspiciuos of any periods of your code that may disable interrupts. with the cli() or noInterupt() commands that do something and then re-enable with sei() or interupt() commands. Excessive use of these cause the buffer to stall. It may be possible there are other libraries that you are using that may intermittently block interrupts. Example the NeoPixel library. If well written they can block for very short periods and then release. Others may not.