Guidance
指路人
g.yi.org
software / rapidq / Examples / Game / directx & direct3d / qdxsound / qdxsound.bas

Register 
注册
Search 搜索
首页 
Home Home
Software
Upload

  
'
'             QDXSOUND Object Sample
'               By Baptiste BIDEAUX
'
'           E-mail : zecreator@yahoo.fr
'
'           Show the object properties

     $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"

'Defint wav sound
     wav.PARENT=form
     wav.filename="sound.wav"
     wav.volume=100

' Defint the playing button
     btn.PARENT=form
     btn.CAPTION="Play"
     btn.left=120
     btn.top=4
     btn.onclick=btnclick

'Defint the volume scrollbar
     vol.PARENT=form
     vol.max=100
     vol.min=70
     vol.width=230
     vol.left=72
     vol.top=48
     vol.position=100
     vol.onscroll=wavchange

'Defint the panning scrollbar
     pan.PARENT=form
     pan.max=100
     pan.min=-100
     pan.width=230
     pan.left=72
     pan.top=96
     pan.position=0
     pan.onscroll=wavchange

' Defint then frequency scrollbar
     freq.PARENT=form
     freq.max=44000
     freq.min=11000
     freq.width=230
     freq.left=72
     freq.top=144
     freq.position=22000
     freq.onscroll=wavchange

' The scrollbars labels
     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()
'
' Playing wav file
'
      wav.position=0 'Set the wav position at 0 (start)
      wav.play
     END SUB

     SUB wavchange()
'
' Change the wav setting (vol, pan and freq)
'
      wav.volume=vol.position
      wav.pan=pan.position
      wav.frequency=freq.position
     END SUB
掌柜推荐
 
 
¥490.00 ·
 
 
¥307.00 ·
 
 
¥288.00 ·
 
 
¥900.00 ·
 
 
¥790.00 ·
 
 
¥487.00 ·
© Sun 2024-11-24  Guidance Laboratory Inc.
Email:webmaster1g.yi.org Hits:0 Last modified:2001-07-26 09:54:28