Home Forums Sparkfun MP3 Shield Library Support Forum Playing MP3's just stop and can hang Arduino Reply To: Playing MP3's just stop and can hang Arduino


The library has functionality when the file is ended or stopped it will flush the VS1053 buffers and update the state. There is manual flush function that can be called with options in the various ways of flushing before or after the STOP is issued.

Are you saying that occasionally the file will end but the state still indicates playing.


Note that every byte has to be read from the SdCard and then written back to the VS1053, at 4M bits per sec. Hence 2M and then it needs overhead. So max is theoretically 200KB per second. but there is a lot of overhead.

Also the file public position pointer in the SdFatLib is only 16bit. So it works only as relative. Along with its cache buffer being only 500 Bytes. So if any other file access is attempted its dumped and re-read. and will likely cause a mess.

I believe I recall I changed the currentPosition to read the second position from the VS1053 rather than the file position, because of the prior limits and Variable Bit Rate can mess with it. The thing to note here is that the currentPosition is suspending and reading the VS1053 and resuming. Which works fine until real time become limited. Just FYI.

I believe I recall having such problems at these Bit Rates, and simply re-sample.