[Gambas-user] Music.Length

Jaap Cramer jaap_cramer at ...67...
Fri Jun 20 12:49:40 CEST 2008


In the GambasDoc is an example on how to get information of a *.wav
file, including duration. See: http://gambasdoc.org/help/lang/read?show

Maybe useful?


On Fri, 2008-06-20 at 12:41 +0200, Benoit Minisini wrote:
> On vendredi 20 juin 2008, Benoit Minisini wrote:
> > On vendredi 20 juin 2008, Patrik Karlsson wrote:
> > > Hello, I'm about to port an old Delphiapp to a nicer environment and
> > > I'm looking at Gambas to do the work, Gambas is realy nice!
> > >
> > > One function I used in Delphi was to get the length of the sound
> > > played in TMediaPlayer, since I would like things done after 80%,
> > > 90%...
> > > Music.Pos tells me where I am, but I can not found a function that
> > > tells me how far I have to go.
> > >
> > > Is there a solution to this?
> >
> > Alas, if I remember correctly, the SDL library has no method to know the
> > length of the music! I don't know if it has changed recently, I will
> > check...
> 
> Apparently, SDL cannot extract the audio length from some formats, like MP3 
> with a variable bitrate stream.
> 
> I don't know why apparently the length of the audio is not encoded in the file 
> header...
> 






More information about the User mailing list