[Gambas-user] sdl.sound and total length of a track
Rolf Schmidt
rolf.frogs at ...221...
Mon Jan 4 11:01:21 CET 2010
Hi Alessandro,
Dimitris Anogiatis wrote:
> to get the length of an MP3 file (since gb.sdl.sound works primarily with
> mp3s) I would personally write an ID3Tag module to get the mp3's length and
> then load it through gb.sound.sdl afterward.
>
> or if you want you could also explore the option of using an external
> player for your program...
The problem with mp3 is, that it can use different compression algorithms,
which may compress the data dynamically i.e. depends on the pattern found in
the sound. So it is difficult to calculate the length directly from the given
file and that is the reason, why the length may be written in the ID3-Tag.
So the tip Dimitris give, seem to be the best solution.
HTH
Rolf
More information about the User
mailing list