Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: pcj on Mon 15/08/2011 14:40:07

Title: Restoring game volume level when restoring a game
Post by: pcj on Mon 15/08/2011 14:40:07
I'm trying to restore the volume level the game was set at when the save file occurred (I wish it happened automatically but it doesn't seem to).  I'm using this code and even though the btnVolume slider returns the correct value it isn't being set to that volume:

function on_event(EventType event, int data) {
 // [...]
 else if (event == eEventRestoreGame) {
   System.Volume = btnVolume.Value;
   SetGameSpeed(btnSpeed.Value);
 }
}


It should work but doesn't... any way to work around?
Title: Re: Restoring game volume level when restoring a game
Post by: pcj on Mon 29/08/2011 14:01:15
I've worked around this by just looping through all the AudioChannels in the game and setting their volume individually rather than setting the System.Volume, but I'm pretty sure this is a bug that should be fixed...
Title: Re: Restoring game volume level when restoring a game
Post by: Monsieur OUXX on Mon 29/08/2011 16:26:22
Techies?
Would this be a bug in the new Audio classes?