master volume

Blitz3D Forums/Blitz3D Beginners Area/master volume

David(Posted 2004) [#1]
where are the function of master volume or all sounds?

thanks


mag.(Posted 2004) [#2]
I guest, no function in Blitz. You have to adjust every channel. But not really sure.

Why don't use 'Volume Control' on your speaker ;)


Hansie(Posted 2004) [#3]
Use SoundVolume() (BlitzPlus!)


Jeppe Nielsen(Posted 2004) [#4]
Use a global variable to adjust all your sounds, using SoundVolume().


ryan scott(Posted 2004) [#5]
i don't get it - is there a way to adjust the master volume or not?

it seems you have to specify the sound you want to adjust, which is very primative.


Regular K(Posted 2004) [#6]
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