AudioTrack.IsDirectPlaybackSupported(AudioFormat, AudioAttributes) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Returns whether direct playback of an audio format with the provided attributes is currently supported on the system.
[Android.Runtime.Register("isDirectPlaybackSupported", "(Landroid/media/AudioFormat;Landroid/media/AudioAttributes;)Z", "", ApiSince=29)]
public static bool IsDirectPlaybackSupported (Android.Media.AudioFormat format, Android.Media.AudioAttributes attributes);
[<Android.Runtime.Register("isDirectPlaybackSupported", "(Landroid/media/AudioFormat;Landroid/media/AudioAttributes;)Z", "", ApiSince=29)>]
static member IsDirectPlaybackSupported : Android.Media.AudioFormat * Android.Media.AudioAttributes -> bool
Parameters
- format
- AudioFormat
a non-null AudioFormat
instance describing the format of
the audio data.
- attributes
- AudioAttributes
a non-null AudioAttributes
instance.
Returns
true if the given audio format can be played directly.
- Attributes
Remarks
Returns whether direct playback of an audio format with the provided attributes is currently supported on the system.
Direct playback means that the audio stream is not resampled or downmixed by the framework. Checking for direct support can help the app select the representation of audio content that most closely matches the capabilities of the device and peripherials (e.g. A/V receiver) connected to it. Note that the provided stream can still be re-encoded or mixed with other streams, if needed.
Also note that this query only provides information about the support of an audio format. It does not indicate whether the resources necessary for the playback are available at that instant.
This member is deprecated. Use AudioManager#getDirectPlaybackSupport(AudioFormat, AudioAttributes)
instead.
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.