I was looking through the help file today and I noticed the SoundPan and SoundVolume commands, so I thought I'd write a little demo to see how they work...
Ok, here's the code:
This should make the sound go --> when I press --> and <-- when I press <--. It should a lso increase the volume when I press up, down when I....etc.etc.
But it doesn't work. Simple as that. It just plays the sound in a loop, and that's it. Anyone?
Ok, here's the code:
;sound program main=LoadSound( "C:/3dgame/Synth3[1].wav" ) LoopSound main ;SoundPan main,0 ;SoundVolume main,0.5 PlaySound(main) Global pan=0 Global vol=0.5 While Not KeyHit(1) If KeyHit(203) Then pan=pan+0.3 If KeyHit(205) Then pan=pan-0.3 If KeyDown(200) Then vol=vol+0.3 If KeyDown(208) Then vol=vol-0.3 SoundPan main,pan SoundVolume main,vol Wend End
This should make the sound go --> when I press --> and <-- when I press <--. It should a lso increase the volume when I press up, down when I....etc.etc.
But it doesn't work. Simple as that. It just plays the sound in a loop, and that's it. Anyone?