Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Gribbler on Mon 12/05/2014 22:45:28

Title: Problem with music volume slider
Post by: Gribbler on Mon 12/05/2014 22:45:28
My music volume slider doesn't work. I'm using default AGS GUI panel (sierra type). Slider code:

Code (ags) Select
function sldMusic_OnChange(GUIControl *control)
{
  SetMusicMasterVolume(sldMusic.Value); 

}

No matter what position slider is in, the volume doesn't change.

Slider for sound however works fine. Here's its code:
Code (ags) Select
function sldSound_OnChange(GUIControl *control)
{
  SetSoundVolume(sldSound.Value);
}


I've consulted manual and everything should work. What am I doing wrong? Both sounds and music are added in their respective folders in audio section in the editor. I tried changing music prority but it doesn't help. I just don't understand how the music is handled. I've searched the forums and found some posts regarding master volume handling but I still don't get it. Sorry for being dumb! :)

Could anyone help me with this or maybe point in the right direction? (not off a Cliff :) )
Title: Re: Problem with music volume slider
Post by: Khris on Tue 13/05/2014 03:30:07
Since AGS 3.2, it's
Code (ags) Select
  Game.SetAudioTypeVolume(eAudioTypeMusic, sldMusic.Value, eVolExistingAndFuture);
Title: Re: Problem with music volume slider
Post by: Gribbler on Tue 13/05/2014 09:32:47
It works! Thanks so much, Khris!