My friend and I are making a game, and a really important part of the game is music. We've written a great deal of the songs for the game already, and all of them are written to loop flawlessly.
However, there is reverb in most of the songs, so when a song is mixed down to an .ogg, there is a couple of seconds of lingering sound at the end that plays out before the song is really "over". So the traditional 'loop song at end' isn't an option, else there would be a stupid 3 or so second delay between loops.
So I programmed a song to play on the 'start of layout' that doesn't loop, then I made another event that plays the song every 78000 ms, which is the exact duration of the song from the very beginning to the end of the last note (this doesn't include the reverb at the end).
So I expect the song to start playing instantly when the layout starts, and for the song to continue looping seamlessly afterwards.
The first loop doesn't work very well. The song starts a second time just a second or two before the first play-through of the song is finished, and it sounds really weird. Afterwards, however, the looping is just fine. Once the song is looping on the event: "autoplay every 78000 ms", the loop sounds exactly how I expected it to. So it's just the first loop that's messed up, apparently.
Note: I'm using the xAudio2 object for sound
Does the clock that counts the milliseconds not necessarily begin exactly when the "start of layout" event is run?
If anybody could tell me anything about this, or suggest a better alternative to my looping songs problem, I would be EXTREMELY grateful. Thanks in advance! <img src="smileys/smiley1.gif" border="0" align="middle" />