Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Song Length & Seeking (Read 2158 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Song Length & Seeking

I am working on an embedded system that plays the following formats:

- MP3
- AAC (M4A, MP4, ...)
- WMA
- FLAC
- WAV
- ILBC (speech)

The decoders are working fine but now we would like to add the ability to seek forward and backward through the file rapidly.  What is the common procedure for this?  Is there a way to determine the frames without using different routines for each type?

Secondly we need to know the total song length in seconds (or samples) to display to the user.  Is there an easy way to determine this once again without a different routine for each type?

Currently our parsers for WMA and MP4 are very makeshift and simple.  They do not really do an exhaustive job of understanding the containers they just pull the bits they need here and there.