Dela via


AudioTrack Class

Definition

Represents an audio track.

public ref class AudioTrack sealed : IMediaTrack
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class AudioTrack final : IMediaTrack
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class AudioTrack : IMediaTrack
Public NotInheritable Class AudioTrack
Implements IMediaTrack
Inheritance
Object Platform::Object IInspectable AudioTrack
Attributes
Implements

Windows requirements

Device family
Windows 10 (introduced in 10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v1.0)

Remarks

Get an instance of this class by calling MediaPlaybackAudioTrackList.GetAt.

Version history

Windows version SDK version Value added
1607 14393 GetEncodingProperties
1607 14393 Name
1607 14393 OpenFailed
1607 14393 PlaybackItem
1607 14393 SupportInfo

Properties

Id

Gets the identifier for the audio track.

Label

Gets or sets the label for the audio track.

Language

Gets a string indicating the language of the audio track.

Name

Gets the name of the AudioTrack.

PlaybackItem

Gets the MediaPlaybackItem containing the AudioTrack.

SupportInfo

Gets support information for the AudioTrack. This information includes the status of the audio decoder, information about any audio degradation applied by the decoder, and the status of the MediaSource with which the audio track is associated.

TrackKind

Gets a value indicating the type of data the track contains. For AudioTrack objects, this value is always MediaTrackKind.Audio.

Methods

GetEncodingProperties()

Gets the audio encoding properties for an AudioTrack.

Events

OpenFailed

Occurs when an AudioTrack fails to open.

Applies to

See also