Le 23/04/2014 17:38, Patrik Karlsson a écrit : > Hi, > > it's almost 6 years since I wrote the first post [1] regarding Music.Length > I recently picked up Gambas again and I am about to finish this little > project now. :) > > As far as I can tell, there is still no easy "Gambas way" to get the length > of an audio file, right? > > Would it be possible to implement such a function now? > It would be really nice to have Music.Play return the length in seconds as > float and a pure Music.Length function. > > In the previous thread I got some answers regarding command line tools, but > in this case my audio files are bundled in the project. > > /patrik > > [1] > http://sourceforge.net/p/gambas/mailman/gambas-user/thread/577069a50806200210i701ff536pf4e655c4cfc45ff9%40mail.gmail.com/#msg19733859
You should use the gb.media component instead. Look at the "MediaPlayer" example, it displays the length of the video/audio file it plays. I admit that playing a file to know its length is a bit stupid. It should be possible to create a GStreamer pipe to just know the length of a multimedia file without playing it. -- Benoît Minisini ------------------------------------------------------------------------------ Start Your Social Network Today - Download eXo Platform Build your Enterprise Intranet with eXo Platform Software Java Based Open Source Intranet - Social, Extensible, Cloud Ready Get Started Now And Turn Your Intranet Into A Collaboration Platform http://p.sf.net/sfu/ExoPlatform _______________________________________________ Gambas-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/gambas-user
