Home Forums Sparkfun MP3 Shield Library Support Forum Examples of skip or skipTo functions? Reply To: Examples of skip or skipTo functions?

#3407
Anonymous
Inactive

Hi Dean,

This is probably too late to help you but I fixed the problem for myself.

I think there is a problem with the maths in SFEMP3Shield.cpp

track.seekSet(((timecode * Mp3ReadWRAM(para_byteRate))/1000) + start_of_music)

I think that timecode * Mp3ReadWRAM(para_byteRate) is causing an overflow in the intermediate calculation i.e. before the division by 1000.  When I display the calculated values that is what appears to be happening.

I have now changed the arithmetic to remove the divide by 1000. I supply a jump defined in seconds not milliseconds and I can now jump to anywhere in the file