Partager via


Spatializer.CanBeSpatialized(AudioAttributes, AudioFormat) Method

Definition

Returns whether audio of the given AudioFormat, played with the given AudioAttributes can be spatialized.

[Android.Runtime.Register("canBeSpatialized", "(Landroid/media/AudioAttributes;Landroid/media/AudioFormat;)Z", "GetCanBeSpatialized_Landroid_media_AudioAttributes_Landroid_media_AudioFormat_Handler", ApiSince=32)]
public virtual bool CanBeSpatialized (Android.Media.AudioAttributes attributes, Android.Media.AudioFormat format);
[<Android.Runtime.Register("canBeSpatialized", "(Landroid/media/AudioAttributes;Landroid/media/AudioFormat;)Z", "GetCanBeSpatialized_Landroid_media_AudioAttributes_Landroid_media_AudioFormat_Handler", ApiSince=32)>]
abstract member CanBeSpatialized : Android.Media.AudioAttributes * Android.Media.AudioFormat -> bool
override this.CanBeSpatialized : Android.Media.AudioAttributes * Android.Media.AudioFormat -> bool

Parameters

attributes
AudioAttributes

the AudioAttributes of the content as used for playback

format
AudioFormat

the AudioFormat of the content as used for playback

Returns

true if the device is capable of spatializing the combination of audio format and attributes, false otherwise.

Attributes

Remarks

Returns whether audio of the given AudioFormat, played with the given AudioAttributes can be spatialized. Note that the result reflects the capabilities of the device and may change when audio accessories are connected/disconnected (e.g. wired headphones plugged in or not). The result is independent from whether spatialization processing is enabled or not.

Java documentation for android.media.Spatializer.canBeSpatialized(android.media.AudioAttributes, android.media.AudioFormat).

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