Hello,
I would like to know how I can get the legnth of a song.
Printable View
Hello,
I would like to know how I can get the legnth of a song.
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.
The song can be either .wav, .mid or .mp3. It is played using mciSendString.
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 ;))