Home Forums Sparkfun MP3 Shield Library Support Forum getBitRateFromMP3File() always returns as zero

Tagged: 

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #2957
    Anonymous
    Inactive

    I’m using MP3 files only, so bitrate info should be available, but I have been unable to get skip, skipTo, or playMP3(filename,timecode) to work because I’m discovering getBitRateFromMP3File doesn’t seem to be changing the bitrate from the default of zero.

    Has anyone got these functions to work and can skip ahead in songs?

    #2958

    Bit Rate has been problematic, where it was working on the last release of my MP3 example files. getBitRateFromMP3File attempts to read the file for the CBR or constant bit rate. Note actual bitrate may get updated later by getAudioInfo(). As the file may be using Variable Bit Rate and not constant.

    The skip(milliseconds) function advances the file position by the mulitple of the actual read back byte rate, not the CBR initially read from the file:

    if(!track.seekCur((uint32_t(timecode/1000 * Mp3ReadWRAM(para_byteRate))))) // skip next X ms.

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