Udostępnij za pośrednictwem


AudioManager.SetSurroundFormatEnabled(Int32, Boolean) Method

Definition

Sets and persists a certain surround format as enabled or not.

[Android.Runtime.Register("setSurroundFormatEnabled", "(IZ)Z", "GetSetSurroundFormatEnabled_IZHandler", ApiSince=31)]
[Android.Runtime.RequiresPermission("android.permission.WRITE_SETTINGS")]
public virtual bool SetSurroundFormatEnabled (int audioFormat, bool enabled);
[<Android.Runtime.Register("setSurroundFormatEnabled", "(IZ)Z", "GetSetSurroundFormatEnabled_IZHandler", ApiSince=31)>]
[<Android.Runtime.RequiresPermission("android.permission.WRITE_SETTINGS")>]
abstract member SetSurroundFormatEnabled : int * bool -> bool
override this.SetSurroundFormatEnabled : int * bool -> bool

Parameters

audioFormat
Int32
enabled
Boolean

the required surround format state, true for enabled, false for disabled

Returns

true if successful, otherwise false

Attributes

Remarks

Sets and persists a certain surround format as enabled or not.

This API is called by TvSettings surround sound menu when user enables or disables a surround sound format. This setting is persisted as global user setting. Applications should revert their changes to surround sound settings unless they intend to modify the global user settings across all apps. The framework does not auto-revert an application's settings after a lifecycle event. Audio focus is not required to apply these settings.

Java documentation for android.media.AudioManager.setSurroundFormatEnabled(int, 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