Determining the length of a file using aRts

Jason Wood jasonwood at blueyonder.co.uk
Mon Sep 16 03:43:39 BST 2002


Hi,

My application needs to be able to determine the length of an audio/movie clip 
as quickly as possible, but I am having trouble determining the best way to 
do this.

The only method I have using aRts at present is to open a play object, wait 
for it to start playing, test it in various ways to discover when the 
overallTime() function is returning a valid value, and then to stop and close 
the playobject again. This is not a method I can use in my application.

Does anyone know of a better solution? I've noticed that the playlist in 
Noatun (I'm using KDE 3.0.3) doesn't attempt to get the length of a file 
until after it has been played once either, so I am starting to thing that 
this is functionality that aRts isn't yet capable of.  If so, I am willing to 
work on adding it, as it's important to me.

Cheers,
Jason

-- 
Jason Wood
Homepage : www.uchian.pwp.blueyonder.co.uk



More information about the kde-multimedia mailing list