Class AuxEffectInfo
- java.lang.Object
-
- com.google.android.exoplayer2.audio.AuxEffectInfo
-
public final class AuxEffectInfo extends Object
Represents auxiliary effect information, which can be used to attach an auxiliary effect to an underlyingAudioTrack.Auxiliary effects can only be applied if the application has the
android.permission.MODIFY_AUDIO_SETTINGSpermission. Apps are responsible for retaining the associated audio effect instance and releasing it when it's no longer needed. See the documentation ofAudioEffectfor more information.
-
-
Field Summary
Fields Modifier and Type Field Description inteffectIdThe identifier of the effect, orNO_AUX_EFFECT_IDif there is no effect.static intNO_AUX_EFFECT_IDValue foreffectIdrepresenting no auxiliary effect.floatsendLevelThe send level for the effect.
-
Constructor Summary
Constructors Constructor Description AuxEffectInfo(int effectId, float sendLevel)Creates an instance with the given effect identifier and send level.
-
-
-
Field Detail
-
NO_AUX_EFFECT_ID
public static final int NO_AUX_EFFECT_ID
Value foreffectIdrepresenting no auxiliary effect.- See Also:
- Constant Field Values
-
effectId
public final int effectId
The identifier of the effect, orNO_AUX_EFFECT_IDif there is no effect.- See Also:
AudioTrack.attachAuxEffect(int)
-
sendLevel
public final float sendLevel
The send level for the effect.- See Also:
AudioTrack.setAuxEffectSendLevel(float)
-
-
Constructor Detail
-
AuxEffectInfo
public AuxEffectInfo(int effectId, float sendLevel)Creates an instance with the given effect identifier and send level.- Parameters:
effectId- The effect identifier. This is the value returned byAudioEffect.getId()on the effect, or 0 which represents no effect. This value is passed toAudioTrack.attachAuxEffect(int)on the underlying audio track.sendLevel- The send level for the effect, where 0 represents no effect and a value of 1 is full send. IfeffectIdis not 0, this value is passed toAudioTrack.setAuxEffectSendLevel(float)on the underlying audio track.
-
-