MediaPlayer.AttachAuxEffect(Int32) Method

Definition

Attaches an auxiliary effect to the player.

[Android.Runtime.Register("attachAuxEffect", "(I)V", "GetAttachAuxEffect_IHandler")]
public virtual void AttachAuxEffect (int effectId);
[<Android.Runtime.Register("attachAuxEffect", "(I)V", "GetAttachAuxEffect_IHandler")>]
abstract member AttachAuxEffect : int -> unit
override this.AttachAuxEffect : int -> unit

Parameters

effectId
Int32

system wide unique id of the effect to attach

Attributes

Remarks

Attaches an auxiliary effect to the player. A typical auxiliary effect is a reverberation effect which can be applied on any sound source that directs a certain amount of its energy to this effect. This amount is defined by setAuxEffectSendLevel(). See #setAuxEffectSendLevel(float).

After creating an auxiliary effect (e.g. android.media.audiofx.EnvironmentalReverb), retrieve its ID with android.media.audiofx.AudioEffect#getId() and use it when calling this method to attach the player to the effect.

To detach the effect from the player, call this method with a null effect id.

This method must be called after one of the overloaded setDataSource methods.

Java documentation for android.media.MediaPlayer.attachAuxEffect(int).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to