Class ShadowAudioEffect
- Direct Known Subclasses:
- ShadowDynamicsProcessing,- ShadowEqualizer
AudioEffect by shadowing its native methods.- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic voidaddEffect(AudioEffect.Descriptor descriptor) Adds an effect represented by anAudioEffect.Descriptor, only to be queried fromqueryEffects().static com.google.common.collect.ImmutableList<AudioEffect> Returns all effects created with anAudioEffectconstructor.intReturns the audio session set in theAudioEffectctor.protected Optional<ByteBuffer> getDefaultParameter(ByteBuffer parameter) Allows sub-classes to provide default parameters.intReturns the priority set in theAudioEffectctor.protected booleanReturns whether theAudioEffectis enabled (as pernative_setEnabled(boolean)).protected intnative_getParameter(int psize, byte[] param, int vsize, byte[] value) Gets the value of the parameter with keyparam, by putting its value invalue.protected voidRemoves this audio effect from the set of active audio effects.protected intnative_setEnabled(boolean enabled) Marks theAudioEffectas enabled, and always returnsSUCCESS.protected intnative_setParameter(int psize, byte[] param, int vsize, byte[] value) Sets the parameter with the given keyparamto the given valuevalue.protected intnative_setup(Object audioEffectThis, String type, String uuid, int priority, int audioSession, int[] id, Object[] desc, String opPackageName) protected static AudioEffect.Descriptor[]Returns the set of audio effects added throughaddEffect(android.media.audiofx.AudioEffect.Descriptor).static voidreset()voidsetErrorCode(int errorCode) Sets the error code to override setter methods in this class.voidsetInitialized(boolean initialized) Updates the state of theAudioEffectitself.
- 
Constructor Details- 
ShadowAudioEffectpublic ShadowAudioEffect()
 
- 
- 
Method Details- 
native_setup
- 
native_setEnabledMarks theAudioEffectas enabled, and always returnsSUCCESS.
- 
native_getEnabledReturns whether theAudioEffectis enabled (as pernative_setEnabled(boolean)).
- 
native_setParameterSets the parameter with the given keyparamto the given valuevalue.- Returns:
- always SUCCESS
 
- 
native_getParameterGets the value of the parameter with keyparam, by putting its value invalue.Note: Sub-classes of ShadowAudioEffectcan declare default values for any parameters. Note: If the given parameter has not been set, and there is no default value for that parameter, then we "return" (setvalueto) a single integer 0.- Returns:
- the size of the returned value, in bytes, or an error code in case of failure.
 
- 
getDefaultParameterAllows sub-classes to provide default parameters.Override this method to provide default parameters. 
- 
getPrioritypublic int getPriority()Returns the priority set in theAudioEffectctor.
- 
getAudioSessionpublic int getAudioSession()Returns the audio session set in theAudioEffectctor.
- 
setInitializedpublic void setInitialized(boolean initialized) Updates the state of theAudioEffectitself.This can be used e.g. to put the AudioEffect 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 AudioEffect.SUCCESSsetters in the AudioEffect will early-out and return that error code.
- 
addEffectAdds an effect represented by anAudioEffect.Descriptor, only to be queried fromqueryEffects().
- 
queryEffectsReturns the set of audio effects added throughaddEffect(android.media.audiofx.AudioEffect.Descriptor).Note: in the original AudioEffectimplementation this method returns all the existing unique AudioEffects created through anAudioEffectctor. In this implementation only the effects added throughaddEffect(android.media.audiofx.AudioEffect.Descriptor)are returned here.
- 
getAudioEffectsReturns all effects created with anAudioEffectconstructor.
- 
native_releaseRemoves this audio effect from the set of active audio effects.
- 
reset
 
-