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

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #3324

    I have been attempting to use the skip and skipTo functions to move to a particular location in an mp3 file but the files always start back at the beginning.

    A snippet of the code is below:


    result = MP3player.skip(track[i].currentPosition);

    The result is zero.

    I am running on a bareconductive touchboard.

    Any ideas on how to debug this?



    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

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.