views:

89

answers:

2

Hi,

I noticed many players display audio track duration before loading the sound file, but I cannot figure out how that is done. So how can I get the duration of an mp3 file in Flex without having to load the file in a Sound object ? Think about loading 1000+ files in an application that has to immediately display the duration for each track.

Thanks !

A: 

Wow! It's more complicated than I thought. This open source project knows how to do it. Even if you don't want to download the code, there are 7+ references for where to find the information on that page.

wallyk
Thanks for the hint. Unfortunately I'm a Java guy and have no idea of .Net; Also I'm not aware of how to use .Net code in Flex.
kla.us
you cannot use .Net code in flex - run the .Net/java code at the server and store the results in an xml file. Load this xml file in to flex.
Amarghosh
A: 

If you read just the ID3 metadata there is a chance the time information is there.

Jon.Stromer.Galley
I just scanned through my collection of 11,000 or so MP3 file: less than a thousand have an ID3 tag, and those are only tracks I've labeled.
wallyk