So I am doing some experimenting with the music coding to find a way to smoothly loop music. I have a few concepts in mind but could use some suggestions.
Here's what I have so far:
1) While I'm not sure how many consecutive WMA's the engine itself can play at the same time without slowdowns, I am certain 2 tracks can play at the same time... one can start almost immediately. (I've heard the BGM and the Item Obtained Jingle run at the same time.)
2) What I know so far is how video games usually loop music is by telling the game if the track end to go back and continue to play at that point until a certain point. Of course this is usually done either in a chip tune setting (Like the Sega Genesis) or in a MIDI file setting.
This gives me 2 concepts of how music can smoothly be looped instead of adding hours of endless track that take up memory...
Concept 1) Using my first idea, there could be two files that has the same music. The first one that plays the one with the beginning and the second one that starts where the loop starts. When the first WMA gets to the end of the track, the second WMA will continue to play indefinitely.
Pro: Perfectly smooth music play
Con: High Memory Usage
Concept 2) I'm not sure how to properly code this, but if there was a way to tell the engine when a 2 minute song hits 2:00 to go back to 0:17 of the track and create a infinite loop in the code, that would also create a loop in this song.
Pro: Save Memory Usage
Con: Choppy loop or abrupt pause if not set back precisely.
I'm actually looking into Concept 2 for my music pack since it will contain quite a few MB's