Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: on Sat 13/03/2004 19:48:38

Title: Fade Out Function
Post by: on Sat 13/03/2004 19:48:38
i've made this function to fade out the music but it doesn't work.....why?
it seems that the master volume=0 is too high and the fade out is not smooth....



function FadeOutMusic(int tempo){
 
   int i;
   i=100;
   while (i>=0){
   SetMusicMasterVolume(i);
   Wait(tempo/100);
   i=i-1;
   }
 StopMusic();}
   

thx

Cisco
Title: Re:Fade Out Function
Post by: Ben on Sat 13/03/2004 20:30:19
Unfortunately, putting the master volume doesn't turn it all the way down. It just puts it about half the volume as the highest value. I've tried to find a way around this, but no luck..

If you're using Mp3 or OGG for music, you could try the crossfade option, but that won't work for Midi or Mod tracks..
Title: Re:Fade Out Function
Post by: Pumaman on Sat 13/03/2004 22:15:54
If you're not using MIDI music, use SetDigitalMasterVolume instead - it allows a full range of volume fading.
Title: Re:Fade Out Function
Post by: strazer on Fri 26/03/2004 11:22:02
But SetDigitalMasterVolume affects all other digital sound as well (sound effects, ambience).
Is there a technical reason why digital music can't be turned further down? Otherwise this would be on my wishlist.