0

I have a question concerning the idea behind the seeking of an audio file like (mp3 file). I am trying to implement my own seeking mechanism, but I cant understand how media players knows how to seek through the audio samples of a file.

My question:

  • are audio samples saved with some time stamp?
  • if yes, what kind of timestamp (seconds, milliseconds,....)?
  • how often does the media recorder record audio samples?
  • how is the progress bar of the seeking linked to the audio samples.
  • lets say you talk and then you are quite, does the media recorder record silence as empty audio samples?
1

There is no timestamp as such in the mp3 data format, however mp3 data is contained in 'frames' or 'blocks'. You would have to have access to the complete file and be able to access each block uniquely for this to work. You might run into problems with VBR files (Variable BitRate) but CBR (Constant Bit Rate) should be do-able. mp3 data does not contain samples, it contains blocks of predominantly frequency-related data that are decoded back into samples by the codec.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.