home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 63 / CDACTUAL63.iso / Aplicaciones / DarkBasic / DemoDarkBasic.exe / help / examples / sound / exam02.dba < prev    next >
Encoding:
Text File  |  2000-04-09  |  973 b   |  38 lines

  1. Rem * Title  : Load and Pan Sounds
  2. Rem * Author : DBS-MB
  3. Rem * Date   : 1st August 99
  4. rem ================================================
  5. rem DARK BASIC EXAMPLE PROGRAM 2
  6. rem ================================================
  7. rem This program will load and pan a sound file 
  8. rem ------------------------------------------------
  9.  
  10. rem Set the ink to white and paper color to black 
  11. ink rgb(244,214,210),1
  12.  
  13. rem Load a wav sound file into number one
  14. load sound "sound.wav",1
  15.  
  16. rem Loop a sound file
  17. loop sound 1
  18.  
  19. rem Set the sound to middle of your speaker
  20. set sound pan 1,0
  21.  
  22. print "press left mouse button to pan sound left"
  23. print "press right mouse button to pan sound right"
  24. print "press F12 to quit to editor"
  25.  
  26. repeat
  27.  
  28.     if mouseclick()=1:set sound pan 1,-10000:endif
  29.     if mouseclick()=2:set sound pan 1, 10000:endif
  30.  
  31. until mouseclick()=1 and mouseclick()=2
  32.  
  33. rem Will wait for you to press any key
  34. suspend for key
  35.  
  36. rem End the program
  37. end
  38.