Home Forums Sparkfun MP3 Shield Library Support Forum pauseMusic() not working when software polling selected

This topic contains 1 reply, has 2 voices, and was last updated by  Michael P. Flaga 8 years, 5 months ago.

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

    Anonymous

    I made some little modifications to the library:

    – pauseMusic() was not working when software polling selected
    pauseMusic() and pauseDataStream() rely on disableRefill() that don’t do nothing when USE_MP3_REFILL_MEANS is set to USE_MP3_Polled
    I modify available(), adding a test to playing_state.  I choose this solution, thinking it do not interfere with other case of USE_MP3_REFILL_MEANS

    – currentPosition() return the time ellapsed since the beginning of execution of the file. If you skip forward or backward in the file with skip(), information returned by currentPosition() become erroneous.
    I add the function getCurrentPosition() based on current position in the file track track.curPosition() divided by bit rate

    – I add too a function to get the duration of the file getTrackDuration() based on file size track.fileSize() divided by bit rate

    – finally added a function to get the bit rate getBitRate()

    Those changes are on Github at https://github.com/gallegojm/Sparkfun-MP3-Player-Shield-Arduino-Library/tree/Due

    #2613

    Its been a while since I updated that section and memory is fading. but I recall that bit rate can be variable, which may lead to incorrect location. So reading the chips is best. Hence I recall it use CBR from file to get started, until the header was complete then used CBR from chip. The real way is to cycle through the jump points frames, which is different for each format. Which is a larger scope.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.