GetSoundFreq
FreqValue = GetSoundFreq(SoundIndex)
 
Parameters:

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

    FreqValue = The play back frequency of this sound (0 to 44000)
 

GetSoundFreq will return the current frequency value of a sound. The frequency value returned will be between 0 (slowest) and 44000( fastest).



FACTS:


* GetSoundFreq will only return the play back fequency of sounds you've manually set with using the SoundFreq command. It can not read back the play back frequency of loaded sound files at this time.




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: :
 


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