Android.Media.Audiofx.Visualizer.GetFft Method
Returns a frequency capture of currently playing audio content.

Syntax

[Android.Runtime.Register("getFft", "([B)I", "GetGetFft_arrayBHandler")]
[return:Android.Runtime.GeneratedEnum]
public virtual VisualizerStatus GetFft (byte[] fft)

Parameters

fft
array of bytes where the FFT should be returned

Returns

Documentation for this section has not yet been entered.

Exceptions

TypeReason
Java.Lang.IllegalStateException

Remarks

Returns a frequency capture of currently playing audio content.

This method must be called when the Visualizer is enabled.

The capture is an 8-bit magnitude FFT, the frequency range covered being 0 (DC) to half of the sampling rate returned by Visualizer.SamplingRate. The capture returns the real and imaginary parts of a number of frequency points equal to half of the capture size plus one.

Note: only the real part is returned for the first point (DC) and the last point (sampling frequency / 2).

The layout in the returned byte array is as follows:

  • n is the capture size returned by getCaptureSize()
  • Rfk, Ifk are respectively the real and imaginary parts of the kth frequency component
  • If Fs is the sampling frequency retuned by getSamplingRate() the kth frequency is: (k*Fs)/(n/2)
Index 0 1 2 3 4 5 ... n - 2 n - 1
Data Rf0 Rf(n/2) Rf1 If1 Rf2 If2 ... Rf(n-1)/2 If(n-1)/2

[Android Documentation]

Requirements

Namespace: Android.Media.Audiofx
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 9