UnityEngine.AudioSource.GetSpectrumData C# (CSharp) Method

GetSpectrumData() public method

Provides a block of the currently playing audio source's spectrum data.

public GetSpectrumData ( float samples, int channel, FFTWindow window ) : void
samples float The array to populate with audio samples. Its length must be a power of 2.
channel int The channel to sample from.
window FFTWindow The FFTWindow type to use when sampling.
return void
        public void GetSpectrumData(float[] samples, int channel, FFTWindow window)
        {
            this.GetSpectrumDataHelper(samples, channel, window);
        }

Same methods

AudioSource::GetSpectrumData ( int numSamples, int channel, FFTWindow window ) : float[]

Usage Example

コード例 #1
0
ファイル: uVisualizer.cs プロジェクト: MrFlyingChip/FlashLive
 System.Collections.IEnumerator updateViz()
 {
     while (true)
     {
         theAudioSource.GetSpectrumData(_SpectrumLeft, 0, myFFTWindow);
         updateSectrumViz(_SpectrumLeft);
         yield return(new WaitForFixedUpdate());
     }
 }
All Usage Examples Of UnityEngine.AudioSource::GetSpectrumData