@Implements(value=android.media.audiofx.Visualizer.class, minSdk=9) public class ShadowVisualizer extends Object
Visualizer
class.Modifier and Type | Class | Description |
---|---|---|
static interface |
ShadowVisualizer.VisualizerSource |
Provides underlying data for the
ShadowVisualizer . |
Constructor | Description |
---|---|
ShadowVisualizer() |
Modifier and Type | Method | Description |
---|---|---|
protected int |
native_getCaptureSize() |
|
protected boolean |
native_getEnabled() |
|
protected int |
native_getFft(byte[] fft) |
|
protected int |
native_getPeakRms(Visualizer.MeasurementPeakRms measurement) |
|
protected int |
native_getSamplingRate() |
|
protected int |
native_getWaveForm(byte[] waveform) |
|
protected void |
native_release() |
|
protected int |
native_setCaptureSize(int size) |
|
protected int |
native_setEnabled(boolean enabled) |
|
protected int |
setDataCaptureListener(Visualizer.OnDataCaptureListener listener,
int rate,
boolean waveform,
boolean fft) |
|
void |
setErrorCode(int errorCode) |
Sets the error code to override setter methods in this class.
|
void |
setSource(ShadowVisualizer.VisualizerSource source) |
|
void |
setState(int newState) |
Updates the state of the
Visualizer itself. |
void |
triggerDataCapture() |
Trigger calls to the existing
Visualizer.OnDataCaptureListener . |
public void setSource(ShadowVisualizer.VisualizerSource source)
@Implementation(minSdk=9) protected int setDataCaptureListener(Visualizer.OnDataCaptureListener listener, int rate, boolean waveform, boolean fft)
@Implementation(minSdk=9) protected int native_getSamplingRate()
@Implementation(minSdk=9) protected int native_getWaveForm(byte[] waveform)
@Implementation(minSdk=9) protected int native_getFft(byte[] fft)
@Implementation(minSdk=9) protected boolean native_getEnabled()
@Implementation(minSdk=9) protected int native_setCaptureSize(int size)
@Implementation(minSdk=9) protected int native_getCaptureSize()
@Implementation(minSdk=9) protected int native_setEnabled(boolean enabled)
@Implementation(minSdk=19) protected int native_getPeakRms(Visualizer.MeasurementPeakRms measurement)
@Implementation(minSdk=9) protected void native_release()
public void triggerDataCapture()
Visualizer.OnDataCaptureListener
.
This is a no-op if the listener has not been set.
public void setState(int newState)
Visualizer
itself.
This can be used e.g. to put the Visualizer in an unexpected state and cause an exception the next time the Visualizer is used.
public void setErrorCode(int errorCode)
When the error code is set to anything other than Visualizer.SUCCESS
setters in the
Visualizer will early-out and return that error code.