home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 63 / CDACTUAL63.iso / Aplicaciones / DarkBasic / DemoDarkBasic.exe / help / examples / sound / exam05.dba < prev    next >
Encoding:
Text File  |  1999-08-26  |  1.2 KB  |  42 lines

  1. Rem * Title  : Display Sound Data
  2. Rem * Author : DBS-MB
  3. Rem * Date   : 1st August 99
  4. rem =======================================================
  5. rem DARK BASIC EXAMPLE PROGRAM 5
  6. rem =======================================================
  7. rem This program will load and get info about 3D sound data
  8. rem -------------------------------------------------------
  9.  
  10. rem Load a wav sound file into number one
  11. load 3dsound "sound.wav",1
  12.  
  13. rem Set the 3D sound up
  14. position sound 1,100,200,300
  15. position listener 0,0,-500
  16. rotate listener 10,45,0
  17.  
  18. rem This command will check if there is a sound number one
  19. if sound exist(1)=1:print "there is a sound number one":endif
  20.  
  21. rem This command will check if you loaded the sound has a 3d sound
  22. if sound type(1)=1
  23.     print "this sound file has been loaded has a 3d sound"
  24. else 
  25.     print "this sound file has not been loaded has a 3d sound"
  26. endif
  27.  
  28. rem Display 3D sound data
  29. print sound position x(1)
  30. print sound position y(1)
  31. print sound position z(1)
  32. print listener position x()
  33. print listener position y()
  34. print listener position z()
  35. print listener angle x()
  36. print listener angle y()
  37. print listener angle z()
  38.  
  39. rem End the program
  40. end
  41.  
  42.