$INCLUDE "rapidq.inc"
DIM file AS QFILESTREAM
DECLARE SUB makefile
DECLARE SUB closeprog
file.OPEN ("wavefile.wav", fmcreate)
CREATE form AS QFORM
height=180
width=450
center
borderstyle=bsdialog
CREATE wavefilename AS QEDIT
top=10
left=10
width=100
height=26
END CREATE
CREATE playbutton AS QBUTTON
CAPTION="make"
top=50
left=150
height=22
onclick=makefile
END CREATE
CREATE closebutton AS QBUTTON
CAPTION="close"
top=10
left=150
height=22
onclick=closeprog
END CREATE
SHOWMODAL
END CREATE
SUB makefile
file.writestr("RIFF",4)
file.writenum(180,1)
file.writenum(1,1)
file.writenum(0,1)
file.writenum(0,1)
file.writestr("WAVE",4)
file.writestr("fmt ",4)
file.writenum(16,1)
file.writenum(0,1)
file.writenum(0,1)
file.writenum(0,1)
file.writenum(1,1)
file.writenum(0,1)
file.writenum(1,1)
file.writenum(0,1)
file.writenum(68,1)
file.writenum(172,1)
file.writenum(0,1)
file.writenum(0,1)
file.writenum(136,1)
file.writenum(88,1)
file.writenum(1,1)
file.writenum(0,1)
file.writenum(2,1)
file.writenum(0,1)
file.writenum(16,1)
file.writenum(0,1)
file.writestr("data",4)
file.writenum(144,1)
file.writenum(1,1)
file.writenum(0,1)
file.writenum(0,1)
FOR t=1 TO 100
file.writenum(255,1)
file.writenum(127,1)
file.writenum(0,1)
file.writenum(128,1)
NEXT t
file.CLOSE
RENAME (DIR$("wavefile.wav",faanyfile),wavefilename.text+".wav")
END SUB
SUB closeprog
form.CLOSE
END
END SUB
|