GLBasic User Manual

Main sections

PLAYSOUND()

channel% = PLAYSOUND(num%, pan#, volume#)



Plays the wav sample that had been load to the buffer num%.

pan# specifies the stereo-effect value:
-1.0 left
0.0 middle
+1.0 right

volume# specifies the volume of the sample.
0.0 quiet
1.0 loud

channel% is the channel the sound is played on. See SOUNDPLAYING().

Sample:
 
LOADSOUND "Super.wav", 0, 1

PRINT "SUPER", 0, 100
PLAYSOUND (0, -1, 1)
SHOWSCREEN
MOUSEWAIT
HUSH

PRINT "SUPER", 500, 100
PLAYSOUND (0, 1, 1)
SHOWSCREEN
MOUSEWAIT

See also...