Udostępnij za pośrednictwem


Visualizer.SetDataCaptureListener Method

Definition

Registers an OnDataCaptureListener interface and specifies the rate at which the capture should be updated as well as the type of capture requested.

[Android.Runtime.Register("setDataCaptureListener", "(Landroid/media/audiofx/Visualizer$OnDataCaptureListener;IZZ)I", "GetSetDataCaptureListener_Landroid_media_audiofx_Visualizer_OnDataCaptureListener_IZZHandler")]
public virtual Android.Media.Audiofx.VisualizerStatus SetDataCaptureListener (Android.Media.Audiofx.Visualizer.IOnDataCaptureListener? listener, int rate, bool waveform, bool fft);
[<Android.Runtime.Register("setDataCaptureListener", "(Landroid/media/audiofx/Visualizer$OnDataCaptureListener;IZZ)I", "GetSetDataCaptureListener_Landroid_media_audiofx_Visualizer_OnDataCaptureListener_IZZHandler")>]
abstract member SetDataCaptureListener : Android.Media.Audiofx.Visualizer.IOnDataCaptureListener * int * bool * bool -> Android.Media.Audiofx.VisualizerStatus
override this.SetDataCaptureListener : Android.Media.Audiofx.Visualizer.IOnDataCaptureListener * int * bool * bool -> Android.Media.Audiofx.VisualizerStatus

Parameters

listener
Visualizer.IOnDataCaptureListener

OnDataCaptureListener registered

rate
Int32

rate in milliHertz at which the capture should be updated

waveform
Boolean

true if a waveform capture is requested: the onWaveFormDataCapture() method will be called on the OnDataCaptureListener interface.

fft
Boolean

true if a frequency capture is requested: the onFftDataCapture() method will be called on the OnDataCaptureListener interface.

Returns

#SUCCESS in case of success, #ERROR_NO_INIT or #ERROR_BAD_VALUE in case of failure.

Attributes

Remarks

Java documentation for android.media.audiofx.Visualizer.setDataCaptureListener(android.media.audiofx.OnDataCaptureListener, int, boolean, boolean).

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