[Gambas-user] Music.Length

Benoit Minisini gambas at ...1...
Fri Jun 20 13:24:11 CEST 2008


On vendredi 20 juin 2008, Patrik Karlsson wrote:
> 2008/6/20 Benoit Minisini <gambas at ...1...>:
> > I don't know why apparently the length of the audio is not encoded in the
> > file header...
>
> Ok, I see, at http://www.mp3-tech.org/programmer/frame_header.html I found
>
> "There is no main file header in an MPEG audio file. An MPEG audio
> file is built up from a succession of smaller parts called frames. A
> frame is a datablock with its own header and audio information.
>     In the case of Layer I or Layer II, frames are some totally
> independent items, so you can cut any part of MPEG file and play it
> correctly. The player will then play the music starting to the first
> plain valid frame founded. However, in the case of Layer III, frames
> are not always independant. Due to the possible use of the "byte
> reservoir", wich is a kind of buffer, frames are often dependent of
> each other. In the worst case, 9 frames may be needed before beeing
> able to decode one frame."

Hopefully, there is http://developer.kde.org/~wheeler/taglib.html

Maybe a component could be made from this library to get meta information 
about audio files.

-- 
Benoit Minisini




More information about the User mailing list