decrease sound

BlitzMax Forums/BlitzMax Beginners Area/decrease sound

delusan(Posted 2007) [#1]
I am having no success trying to DECREASE the volume of a .wav sound. The example provided by BM using channel works fine for increasing the volume of the sound but I cant get it to decrese the sound. Ive tried changing the Step .05 to a minus .05 but it has no effect. Help please.


tonyg(Posted 2007) [#2]
Can you post some code?
Anyway this seems to work :
' setchannelvolume.bmx

timer=CreateTimer(20)

sound = LoadSound ("shoot.wav")

For volume#=2.0 To 0.1 Step -0.1
	WaitTimer timer
	channel=CueSound(sound)
	SetChannelVolume channel,volume
	ResumeChannel channel
	Delay 500
Next


<edited for better code example>


H&K(Posted 2007) [#3]
@Tonyg

Dont suppose you know what Im supposed to do to decrease the system volume? (From Bmax)


tonyg(Posted 2007) [#4]
Could be API waveoutsetvolume... possibly?