But now I've found out, that mci cannot read some mp3 files properly.
mciSendString_("status alias length",..) returns a wrong duration.
Ok, I know, mci is obsolete .. and the day must be come that this happens..
But what else?
I've tried LoadMovie -> MovieLength = 0
I've tried LoadSound -> failed
What is the best way mp3s play?
Code: Select all
name.s = "c:\temp\test.mp3"
Debug mciSendString_("open " + Chr(34) + name + Chr(34) + " type mpegvideo alias song", 0, 0, 0)
Debug mciSendString_("set song time format ms", 0, 0, 0)
*mem = AllocateMemory(16)
Debug mciSendString_("status song length", *mem, 16, 0)
len.s = PeekS(*mem)
Debug FormatDate( "%ii:%ss", Val(len)/1000) + " min:sec"
Debug InitMovie()
Debug LoadMovie(0, name)
Debug MovieLength(0)
Debug MovieInfo(0, 0)
Debug InitSound()
Debug LoadSound(0, name)
Debug SoundLength(0, #PB_Sound_Millisecond)