PDA

Click to See Complete Forum and Search --> : Get Song Lenght


Khavoerm
Nov 23rd, 2001, 07:35 PM
Hello,
I would like to know how I can get the legnth of a song.

HarryW
Nov 23rd, 2001, 08:16 PM
That's really not enough information.

If you want any help at all you're going to need to explain at the very least what format the song is in.

Khavoerm
Nov 23rd, 2001, 08:19 PM
The song can be either .wav, .mid or .mp3. It is played using mciSendString.

parksie
Nov 25th, 2001, 02:00 PM
WAV and MP3 have structural information at the beginning of the file, so you can work it out from there (see MSDN for info on WAV, and do a search on google for the MP3 one).

SMF is a bit more complicated, I think you need to go through all the tracks finding their total length and pick the longest one :) (have fun with the file format ;))