Package org.robolectric.shadows
Class ShadowVisualizer
java.lang.Object
org.robolectric.shadows.ShadowVisualizer
Shadow for the 
Visualizer class.- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic interfaceProvides underlying data for theShadowVisualizer.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier 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- 
ShadowVisualizerpublic 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
- 
triggerDataCapturepublic void triggerDataCapture()Trigger calls to the existingVisualizer.OnDataCaptureListener.This is a no-op if the listener has not been set. 
- 
setStatepublic 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. 
- 
setErrorCodepublic 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.
 
-