by Nash » Wed May 09, 2007 5:57 am
That will work, but the main menu doesn't stop the music so it'll desync again.
It'll be slightly better if the MIDI isn't looped (which is uncommon for downloaded MIDIs - you'd have to do it yourself in a MIDI editor). The music will just stop earlier before the next music change.
For cutscenes that have to sync with music, I came up with a solution by making the song an MP3 or OGG, then play it as a sound by using the ACS function AmbientSound().
Sounds can be paused and will continue playing where it stopped when unpaused, and it works for the main menu too.
That will work, but the main menu doesn't stop the music so it'll desync again.
It'll be slightly better if the MIDI isn't looped (which is uncommon for downloaded MIDIs - you'd have to do it yourself in a MIDI editor). The music will just stop earlier before the next music change.
For cutscenes that have to sync with music, I came up with a solution by making the song an MP3 or OGG, then play it as a sound by using the ACS function AmbientSound().
Sounds can be paused and will continue playing where it stopped when unpaused, and it works for the main menu too.