Compartilhar via


AudioEffect.SetEnabled(Boolean) Method

Definition

Enable or disable the effect.

[Android.Runtime.Register("setEnabled", "(Z)I", "GetSetEnabled_ZHandler")]
public virtual Android.Media.Audiofx.AudioEffectStatus SetEnabled (bool enabled);
[<Android.Runtime.Register("setEnabled", "(Z)I", "GetSetEnabled_ZHandler")>]
abstract member SetEnabled : bool -> Android.Media.Audiofx.AudioEffectStatus
override this.SetEnabled : bool -> Android.Media.Audiofx.AudioEffectStatus

Parameters

enabled
Boolean

the requested enable state

Returns

#SUCCESS in case of success, #ERROR_INVALID_OPERATION or #ERROR_DEAD_OBJECT in case of failure.

Attributes

Exceptions

Remarks

Enable or disable the effect. Creating an audio effect does not automatically apply this effect on the audio source. It creates the resources necessary to process this effect but the audio signal is still bypassed through the effect engine. Calling this method will make that the effect is actually applied or not to the audio content being played in the corresponding audio session.

Java documentation for android.media.audiofx.AudioEffect.setEnabled(boolean).

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