public static interface Visualizer.OnDataCaptureListener
Visualizer.setDataCaptureListener(OnDataCaptureListener, int, boolean, boolean)
method.Modifier and Type | Method and Description |
---|---|
void |
onFftDataCapture(Visualizer visualizer,
byte[] fft,
int samplingRate)
Method called when a new frequency capture is available.
|
void |
onWaveFormDataCapture(Visualizer visualizer,
byte[] waveform,
int samplingRate)
Method called when a new waveform capture is available.
|
void onWaveFormDataCapture(Visualizer visualizer, byte[] waveform, int samplingRate)
Data in the waveform buffer is valid only within the scope of the callback. Applications which needs access to the waveform data after returning from the callback should make a copy of the data instead of holding a reference.
visualizer
- Visualizer object on which the listener is registered.waveform
- array of bytes containing the waveform representation.samplingRate
- sampling rate of the audio visualized.void onFftDataCapture(Visualizer visualizer, byte[] fft, int samplingRate)
Data in the fft buffer is valid only within the scope of the callback. Applications which needs access to the fft data after returning from the callback should make a copy of the data instead of holding a reference.
visualizer
- Visualizer object on which the listener is registered.fft
- array of bytes containing the frequency representation.samplingRate
- sampling rate of the audio visualized.