Share via


MediaPlayer.SetAuxEffectSendLevel(Single) Method

Definition

Sets the send level of the player to the attached auxiliary effect.

[Android.Runtime.Register("setAuxEffectSendLevel", "(F)V", "GetSetAuxEffectSendLevel_FHandler")]
public virtual void SetAuxEffectSendLevel (float level);
[<Android.Runtime.Register("setAuxEffectSendLevel", "(F)V", "GetSetAuxEffectSendLevel_FHandler")>]
abstract member SetAuxEffectSendLevel : single -> unit
override this.SetAuxEffectSendLevel : single -> unit

Parameters

level
Single

send level scalar

Attributes

Remarks

Sets the send level of the player to the attached auxiliary effect. See #attachAuxEffect(int). The level value range is 0 to 1.0.

By default the send level is 0, so even if an effect is attached to the player this method must be called for the effect to be applied.

Note that the passed level value is a raw scalar. UI controls should be scaled logarithmically: the gain applied by audio framework ranges from -72dB to 0dB, so an appropriate conversion from linear UI input x to level is: x == 0 -> level = 0 0 < x <= R -> level = 10^(72*(x-R)/20/R)

Java documentation for android.media.MediaPlayer.setAuxEffectSendLevel(float).

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