0
0

I have a song here which causes fmod to loop strangely inside the file, forever. If played in other players (eg: winamp), this doesn’t happen. I tried this with the example FMOD.EXE application. Please advise.

I’m trying to “play all .IT files in a folder”, and obviously, I’m never getting past files like this one, or some that just don’t trigger “FMUSIC_IsFinished” for some reason, even though they seem to get to the end.

Mal.

http://www.modarchive.com/cgi-bin/downl … forestr.it

  • You must to post comments
0
0

I found u can not trust the result of FMUSIC_IsFinished. I has to manually calculate my times, and figure out if it ended by myself, its not totally accureate atm, but its very close, usally with a + of about 12 seconds.

What I do is…Open the file quickly start it playing then preform the following within VB
<pre>
i = GetBPM()
s = GetSpeed()

    k = ((i * 2) / 5)
    st = ((1 / k) * 1000) * s

    mySong.SongDescription.KBPS = k

    Orders = GetNumOrders() - 1

    For i = 0 To Orders
        t = t + FMUSIC_GetPatternLength(mySong.songHandle, i)
    Next i

    mySong.SongDescription.SongLenghtInBytes = t
    mySong.SongDescription.SongLenghtInMS = t * st

</pre>
Then I stop it playing. The song in bytes is wrong i believe, its acutally the song lenght in rows, but close enough. It is very close in correct time usually like i said a few seconds off. If the song don’g change speeds at all its almost dead on.

Rummor has it Brett is currently adding to FMUSIC to enable us to read through the rows looking for speed changes and other things, this would make the calculations alot more accurate.

All u need to do then is check the current playing time vs the length to know if it should have ended or not.

I hope this helps you out.

++Cire.

<font size=-1>[ This Message was edited by: Cire on 2002-03-10 23:11 ]</font>

  • You must to post comments
0
0

Buy why is it that winamp plays it “normally”, but not the fmod functions?

Mal.

  • You must to post comments
0
0

Isn’t it possible to detect if the module wants to jump to a pattern that has been played again, and will cause to reach the same jump again?

  • You must to post comments
Showing 3 results
Your Answer

Please first to submit.