sound_volume not lowering the sound... volume [RESOLVED]

Geners

Member
So in my room creation I have this

Code:
sound_volume(SoverThereBackgroundMusic,0.1);
audio_play_sound(SbackgroundSounds,1,true);
audio_play_sound(SoverThereBackgroundMusic,2,true);
but the sound of SoverThereBackgroundMusic (yes, I know, I should shorten that) doesn't actually lower. I originally tried 0.5, then 0.3 and now 0.1 and it plays at the same volume.

What am I doing wrong?
 

CloseRange

Member
sound_volume is a legacy function (it's in game maker but nobody is supposed to use it)
if it starts with sound_ it's legacy if it uses audio_ it's correct

the function you want is:
audio_sound_gain(index, volume, time)
index is the name of the sound
volume is... the volume...
and time is how long it should take to get to that sound:
if you want it to instantly go to that sound set it to 0
if you want it to gradually go to that sound over 5 seconds say 5000 (time is in milliseconds here)

this is where you can find all the correct audio functions
 

Geners

Member
sound_volume is a legacy function (it's in game maker but nobody is supposed to use it)
if it starts with sound_ it's legacy if it uses audio_ it's correct

the function you want is:
audio_sound_gain(index, volume, time)
index is the name of the sound
volume is... the volume...
and time is how long it should take to get to that sound:
if you want it to instantly go to that sound set it to 0
if you want it to gradually go to that sound over 5 seconds say 5000 (time is in milliseconds here)

this is where you can find all the correct audio functions
You're an absolute life saver. Thank you for your help, I really appreciate the time you put into answering questions and handling issues on this forum.
 
Top