다음을 통해 공유


Visualizer.IOnDataCaptureListener.OnFftDataCapture Method

Definition

Method called when a new frequency capture is available.

[Android.Runtime.Register("onFftDataCapture", "(Landroid/media/audiofx/Visualizer;[BI)V", "GetOnFftDataCapture_Landroid_media_audiofx_Visualizer_arrayBIHandler:Android.Media.Audiofx.Visualizer/IOnDataCaptureListenerInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public void OnFftDataCapture (Android.Media.Audiofx.Visualizer? visualizer, byte[]? fft, int samplingRate);
[<Android.Runtime.Register("onFftDataCapture", "(Landroid/media/audiofx/Visualizer;[BI)V", "GetOnFftDataCapture_Landroid_media_audiofx_Visualizer_arrayBIHandler:Android.Media.Audiofx.Visualizer/IOnDataCaptureListenerInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member OnFftDataCapture : Android.Media.Audiofx.Visualizer * byte[] * int -> unit

Parameters

visualizer
Visualizer

Visualizer object on which the listener is registered.

fft
Byte[]

array of bytes containing the frequency representation.

samplingRate
Int32

sampling rate of the visualized audio.

Attributes

Remarks

Method called when a new frequency capture is available.

Data in the fft buffer is valid only within the scope of the callback. Applications which need access to the fft data after returning from the callback should make a copy of the data instead of holding a reference.

For the explanation of the fft data array layout, and the example code for processing it, please see the documentation for #getFft(byte[]) method.

Java documentation for android.media.audiofx.Visualizer.OnDataCaptureListener.onFftDataCapture(android.media.audiofx.Visualizer, byte[], int).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to