[SOLVED] Music not looping on game restore

Started by MiteWiseacreLives!, Wed 19/11/2014 07:21:54

Previous topic - Next topic

MiteWiseacreLives!

I think I'm going to get slammed for this question, but I haven't found any satisfying answers manual, forums, etc..
I'm using AGS 3.3.2, and in order to have different music in each room I've used the following code in room_Load
Code: ags

function room_Load()
{
  aK_short.Stop(); // Stop the previous track
  aN_short.Play(eAudioPriorityHigh, eRepeat); // Start the room specific one
}

I am in debug mode (not sure if it matters) and whenever I restore it will play the correct music but will not repeat, just plays once.
Also are their any good tutorials for most recent music system? lots of irrelevant stuff out there

Crimson Wizard

Which type of music are you using?

There's a known bug in AGS that WAV does not repeat on restoring the game.
Here's similar question asked just couple of weeks ago:
http://www.adventuregamestudio.co.uk/forums/index.php?topic=51250.0

MiteWiseacreLives!

OH Crud! I was sure i was working with MP3 but they are all WAV....

Crimson Wizard

Just use this workaround:
Code: ags

function on_event(EventType event, int data)
{
    if (event == eEventRestoreGame)
    {
        // restart your music here
    }
}

MiteWiseacreLives!

Your very gracious C Wizard! Thanks, I even read that thread thinking it didn't apply to my case, what a noob :-[

SMF spam blocked by CleanTalk