LoopSound
LoopSound SoundIndex
 
Parameters:

    SoundIndex = The Index of the sound you wish to loop
Returns: NONE
 

LoopSound sets a sound to automatically loops when it's played.



FACTS:


* Once you activate a sound to be looped, it can't be disabled.



Mini Tutorial:


This simple example shows how you would load a sound file as sound #1, enable automatic looping and then play it.

Note: In order for this example to work you would need a sound file for it to load.


  
; Load the sound file into memory
  LoadSound "MySoundFile.wav",1
  
; Set sound to loop automatically once played
  LoopSound 1
  
; Begin playing the looped sound.
  PlaySound 1
  
; Start a Do/loop
  Do
   ;Clear the Screen to black
     Cls RGB(0,0,0)
     
   ; display a message
     Print "Sound Is Looping on it's own"
     
   ; display the screen
     Sync
   ; Loop back to the DO statement.
  Loop
  

 
Related Info: LoadNewSound | LoadSound | PlaySound | SoundVolume | StopSound :
 


(c) Copyright 2002 - 2024 - Kevin Picone - PlayBASIC.com