|
@@ -1,15 +1,17 @@
|
|
|
' setchannelpan.bmx
|
|
|
|
|
|
+SuperStrict
|
|
|
+
|
|
|
Graphics 640, 480
|
|
|
|
|
|
-channel = AllocChannel ()
|
|
|
-sound = LoadSound ("shoot.wav") ' Use a short sample...
|
|
|
+Local channel:TChannel = AllocChannel ()
|
|
|
+Local sound:TSound = LoadSound ("shoot.wav") ' Use a short sample...
|
|
|
|
|
|
Repeat
|
|
|
If MouseHit(1) PlaySound sound,channel
|
|
|
|
|
|
- pan# = MouseX () / (GraphicsWidth () / 2.0) - 1
|
|
|
- vol# = 1 - MouseY () / 480.0
|
|
|
+ Local pan# = MouseX () / (GraphicsWidth () / 2.0) - 1
|
|
|
+ Local vol# = 1 - MouseY () / 480.0
|
|
|
SetChannelPan channel, pan
|
|
|
SetChannelVolume channel, vol*2
|
|
|
|