Share via


AudioTrack.AttachAuxEffect(Int32) Method

Definition

Attaches an auxiliary effect to the audio track.

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

Parameters

effectId
Int32

system wide unique id of the effect to attach

Returns

error code or success, see #SUCCESS, #ERROR_INVALID_OPERATION, #ERROR_BAD_VALUE

Attributes

Remarks

Attaches an auxiliary effect to the audio track. 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(). #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 audio track to the effect.

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

Java documentation for android.media.AudioTrack.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

See also