Adventure Game Studio

AGS Development => Engine Development => Topic started by: Radiant on Tue 17/09/2013 13:20:48

Title: (solved) SetMusicMasterVolume (0);
Post by: Radiant on Tue 17/09/2013 13:20:48
I would expect SetMusicMasterVolume (0) to reduce the volume to zero, thus making the music inaudible; this doesn't actually happen. On my system, setting it to 0 is about half as loud as setting it to its maximum of 100.
Title: Re: SetMusicMasterVolume (0);
Post by: Crimson Wizard on Tue 17/09/2013 13:30:27
Spoiler
Err.... wtf?
Code (cpp) Select

void SetMusicMasterVolume(int newvol) {
    if ((newvol<0) | (newvol>100))
        quit("!SetMusicMasterVolume: invalid volume - must be from 0-100");
==> play.music_master_volume=newvol+60; <==============================
    update_music_volume();
}

[close]

EDIT:
The 3.2 manual suggests that SetMusicMasterVolume() function is deprecated.
Try using System.Volume or Game.SetAudioTypeVolume().
Title: Re: SetMusicMasterVolume (0);
Post by: Radiant on Tue 17/09/2013 13:53:06
Right. Thank you :)