master volume

Blitz3D Forums/Blitz3D Beginners Area/master volume

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Theres no variable that can adjust every sounds volume without making some custom functions.

The example below *should* work, but I never tried it.

Example:
global Master_Volume#=0.5 ; between 0 and 1
global Beep%=LoadSound("somefolder\beep.wav")
global Laser%=LoadSound("someotherfolder\laser.wav")

Play_Sound(Beep%)
Delay 500
Play_Sound(Laser%)
Delay 500
End

Function Play_Sound(Sound%)
Channel%=PlaySound%(Sound%)
ChannelVolume Channel%,Master_Volume#
End Function