Package org.robolectric.shadows
Class ShadowVisualizer
java.lang.Object
org.robolectric.shadows.ShadowVisualizer
Shadow for the
Visualizer class.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceProvides underlying data for theShadowVisualizer. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected intprotected booleanprotected intnative_getFft(byte[] fft) protected intnative_getPeakRms(Visualizer.MeasurementPeakRms measurement) protected intprotected intnative_getWaveForm(byte[] waveform) protected voidprotected intnative_setCaptureSize(int size) protected intnative_setEnabled(boolean enabled) protected intsetDataCaptureListener(Visualizer.OnDataCaptureListener listener, int rate, boolean waveform, boolean fft) voidsetErrorCode(int errorCode) Sets the error code to override setter methods in this class.voidvoidsetState(int newState) Updates the state of theVisualizeritself.voidTrigger calls to the existingVisualizer.OnDataCaptureListener.
-
Constructor Details
-
ShadowVisualizer
public ShadowVisualizer()
-
-
Method Details
-
setSource
-
setDataCaptureListener
@Implementation protected int setDataCaptureListener(Visualizer.OnDataCaptureListener listener, int rate, boolean waveform, boolean fft) -
native_getSamplingRate
-
native_getWaveForm
-
native_getFft
-
native_getEnabled
-
native_setCaptureSize
-
native_getCaptureSize
-
native_setEnabled
-
native_getPeakRms
-
native_release
-
triggerDataCapture
public void triggerDataCapture()Trigger calls to the existingVisualizer.OnDataCaptureListener.This is a no-op if the listener has not been set.
-
setState
public void setState(int newState) Updates the state of theVisualizeritself.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.
-
setErrorCode
public void setErrorCode(int errorCode) Sets the error code to override setter methods in this class.When the error code is set to anything other than
Visualizer.SUCCESSsetters in the Visualizer will early-out and return that error code.
-