$INCLUDE "rapidq.inc"
DECLARE SUB btnclick()
DECLARE SUB wavchange()
DIM form AS QFORM
DIM wav AS qdxsound
DIM vol AS QSCROLLBAR
DIM pan AS QSCROLLBAR
DIM freq AS QSCROLLBAR
DIM btn AS QBUTTON
DIM lab1 AS QLABEL
DIM lab2 AS QLABEL
DIM lab3 AS QLABEL
form.center
form.borderstyle=3
form.CAPTION="QDXSOUND Object sample"
wav.PARENT=form
wav.filename="sound.wav"
wav.volume=100
btn.PARENT=form
btn.CAPTION="Play"
btn.left=120
btn.top=4
btn.onclick=btnclick
vol.PARENT=form
vol.max=100
vol.min=70
vol.width=230
vol.left=72
vol.top=48
vol.position=100
vol.onscroll=wavchange
pan.PARENT=form
pan.max=100
pan.min=-100
pan.width=230
pan.left=72
pan.top=96
pan.position=0
pan.onscroll=wavchange
freq.PARENT=form
freq.max=44000
freq.min=11000
freq.width=230
freq.left=72
freq.top=144
freq.position=22000
freq.onscroll=wavchange
lab1.PARENT=form
lab1.CAPTION="Volume"
lab1.left=16
lab1.top=48
lab2.PARENT=form
lab2.CAPTION="Panning"
lab2.left=16
lab2.top=96
lab3.PARENT=form
lab3.CAPTION="Frequency"
lab3.left=16
lab3.top=144
form.SHOWMODAL
SUB btnclick()
wav.position=0
wav.play
END SUB
SUB wavchange()
wav.volume=vol.position
wav.pan=pan.position
wav.frequency=freq.position
END SUB
|