home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 63 / CDACTUAL63.iso / Aplicaciones / DarkBasic / DemoDarkBasic.exe / help / examples / sound / exam06.dba < prev    next >
Encoding:
Text File  |  1999-09-07  |  1.6 KB  |  60 lines

  1. Rem * Title  : Checking Sound Status
  2. Rem * Author : DBS-MB
  3. Rem * Date   : 1st August 99
  4. rem =======================================================
  5. rem DARK BASIC EXAMPLE PROGRAM 6
  6. rem =======================================================
  7. rem This program will load and get info about 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 Clear the screen
  14. cls 
  15.  
  16. rem Load a wav sound file into number one
  17. load sound "sound.wav",1
  18.  
  19. rem Set the sound to middle of your speaker
  20. set sound pan 1,0
  21.  
  22. rem This command will check if there is a sound number one
  23. if sound exist(1)=1:print "there is a sound number one":endif
  24.  
  25. print "the sound pan is ",get sound pan(1)
  26. print "the sound speed is ",get sound speed(1)
  27. print "the sound volume is ",get sound volume(1)
  28.  
  29. rem This command will check if you loaded the sound has a 3d sound
  30. if sound type(1)=1
  31.     print "this sound file has been loaded has a 3d sound"
  32. else 
  33.     print "this sound file has not been loaded has a 3d sound"
  34. endif
  35.  
  36. rem This command will check if the sound number one is playing
  37. if sound playing(1)=1
  38.     print "the sound is playing"
  39. else
  40.     print "the sound is not playing"
  41. endif
  42.  
  43. rem This command will check if the sound number one is looping
  44. if sound looping(1)=1
  45.     print "the sound is looping"
  46. else
  47.     print "the sound is not looping"
  48. endif
  49.  
  50. rem This command will check if the sound number one is pause
  51. if sound paused(1)=1
  52.     print "the sound is paused"
  53. else
  54.     print "the sound is not paused"
  55. endif
  56.  
  57. rem End the program
  58. end
  59.  
  60.