Home All Groups Group Topic Archive Search About
Author
26 Jan 2006 10:36 PM
iwdu15
hi, ive tried using the Windows Media Player control to get the duration of a
song, but it comes up with "00:00" when the song is longer than this. How can
i calculate the duration of the song? thanks
--
-iwdu15

Author
27 Jan 2006 3:03 AM
Ken Tucker [MVP]
Hi,

        You can get if from the mp3 tag.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dncodefun/html/code4fun01242003.asp

Ken
----------------
Show quoteHide quote
"iwdu15" <jmmgoalsteratyahoodotcom> wrote in message
news:B5FDB2B0-50C6-4CCA-A384-919474423B82@microsoft.com...
> hi, ive tried using the Windows Media Player control to get the duration
> of a
> song, but it comes up with "00:00" when the song is longer than this. How
> can
> i calculate the duration of the song? thanks
> --
> -iwdu15
Author
27 Jan 2006 8:24 PM
Mitchell S. Honnert
If you don't want to install the Windows SDK just to get to the MPEG data,
check out my free ID3/MPEG library, UltraID3Lib.  It not only reads all of
the MPEG data, including length, but it's a full ID3 tag editor as well.
(The irony of Ken's post is that I read that same article soon after it came
out and became so frustrated with the Windows Media SDK's interface to the
ID3 tag data that I decided to write my own library.)

Mitchell S. Honnert
www.UltraID3Lib.com


Show quoteHide quote
"iwdu15" <jmmgoalsteratyahoodotcom> wrote in message
news:B5FDB2B0-50C6-4CCA-A384-919474423B82@microsoft.com...
> hi, ive tried using the Windows Media Player control to get the duration
> of a
> song, but it comes up with "00:00" when the song is longer than this. How
> can
> i calculate the duration of the song? thanks
> --
> -iwdu15