Hi all. I love FMod, but am having a problem.

I’m using the real-time stitching example to play a sequence of ogg files. I found that the last song in my list sometimes but not always gets cut off before finishing (I’m looping two sub-sounds like the example with real-time replacement) .

In the documentation, under Sound::setSubSound, I see the quote, "If a subsound is set which is a member of a sentence, the loop points of the sentence will be reset to a loopstart of 0 and a loopend of the length of the sentence minus 1." This lead me to realize that the problem I’m experiencing is when a longer song is replace by a shorter song, the [i:118nszm3]sentence[/i:118nszm3] length is shorter and my song will get cut off. So even though the song playing is fully buffered, the loopEnd point may be updated to a shorter sentence length and the song interrupted.

So my question: am I supposed to set loop points after doing the setSubSound? If so, two what? I don’t want to set the loopEnd point beyond the end of the sentence (the old loop point), do I? Or should I (reasonably) expect the buffered content to finish playing despite the updated sentence length?

My example is directly taken from the realtimestitching sample, and the problem should be easily seen if you have three songs of lengths 12 seconds, 6 seconds and 10 seconds. The 6-second song will be cut off 2 seconds before the end.

Thanks for any help/info you can provide.[/i]

  • You must to post comments
Showing 0 results
Your Answer

Please first to submit.