GetSoundVolume
VolumeLevel = GetSoundVolume(SoundIndex)
 
Parameters:

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

    VolumeLevel = The volume level of this sound (0 to 255)
 

GetSoundVolume will return the current volume level of a sound. The volume level value returned will be between 0 (softest) and 255(loudest).



FACTS:


* None



Mini Tutorial:


This simple example, loads a sound file as sound 1, sets the sounds volume, panning and play back frequency, then displays this information back to the user.


  
  
; Load a sound file to sound 1
  LoadSound "My_Sound_File.wav",1
  
; Set Sound 1's Volume to 100
  SoundVolume 1,100
  
; Set sound 1's panning to the left -255
  SoundPan 1,-255
  
; Set sound 1's play back frequency to 9999
  SoundFreq 1,9999
  
; Display the information about this sound
  Print "Sound Status:"+Str$(GetSoundStatus(1))
  Print "Sound Volume:"+Str$(GetSoundVolume(1))
  Print "Sound Panning:"+Str$(GetSoundPan(1))
  Print "Sound Frequency:"+Str$(GetSoundFreq(1))
  
; Display the Screen and wait for the user to press a key
  Sync
  WaitKey
  
  




This example would output.

  
  Sound Status:1
  Sound Volume:100
  Sound Panning:-255
  Sound Frequency:9999
  

 
Related Info: PlayDynamicSound | PlaySound | ResumeSound | SoundMasterVolume | StopSound :
 


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