LoadNewSound
SoundIndex = LoadNewSound(Filename$)
 
Parameters:

    Filename$ = The file name of the sound you wish to load
Returns:

    SoundIndex = The Index where this sound data is stored
 

LoadNewSound will load a sound file into your computers sound memory. You must provide it will the filename and path of the sound file you wish to load. LoadNewSound will return then Sound Index for you. Once the sound data has been loaded, you can play the sound using the PlaySound, PlayDynamicSound commands.




FACTS:


* LoadNewSound Expects sound files to be in the WAV format.



Mini Tutorial:


This example will load the sound file called "explosion.wav" as sound #1. ONce the sound is loaded into


  
  
; Load the New Sound File "Explosion.wav"
  MySound=LoadNewSound("explosion.wav")
  
; Display the returned sound media index
  Print "Sound Index:"+Str$(MySound)
  
; Display the Status of MYSound
  Print "Sound Status:"+Str$(GetSoundStatus(MySound))
  
; Display the Screen and wait for the user to press a key
  Sync
  WaitKey
  



This example would output (as long as the sound loaded).

  
  Sound Index:1
  Sound Status:1
  

 
Related Info: GetFreeSound | LoadMusic | LoadSound | LoopSound | PlayDynamicSound | PlaySound | SoundVolume | StopSound :
 


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