Audio​Stream​Descriptor Audio​Stream​Descriptor Audio​Stream​Descriptor Class

Definition

Some information relates to pre-released product which may be substantially modified before it’s commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.

Prerelease APIs are identified by a Prerelease label.

Prerelease. Defines an audio media stream.

public : sealed class AudioStreamDescriptor : IAudioStreamDescriptor, IAudioStreamDescriptor2, IMediaStreamDescriptorpublic sealed class AudioStreamDescriptor : IAudioStreamDescriptor, IAudioStreamDescriptor2, IMediaStreamDescriptorPublic NotInheritable Class AudioStreamDescriptor Implements IAudioStreamDescriptor, IAudioStreamDescriptor2, IMediaStreamDescriptor
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Remarks

See the MediaStreamSource Sample for an example of using Media Stream Source in a Windows Store app.

Constructors

AudioStreamDescriptor(AudioEncodingProperties) AudioStreamDescriptor(AudioEncodingProperties) AudioStreamDescriptor(AudioEncodingProperties)

Creates an instance of AudioStreamDescriptor class using the specified AudioEncodingProperties.

public : AudioStreamDescriptor(AudioEncodingProperties encodingProperties)public AudioStreamDescriptor(AudioEncodingProperties encodingProperties)Public Sub New(encodingProperties As AudioEncodingProperties)
Parameters
encodingProperties
AudioEncodingProperties AudioEncodingProperties AudioEncodingProperties

The encoding properties for the audio stream.

Attributes

Properties

EncodingProperties EncodingProperties EncodingProperties

The encoding properties of the stream.

public : AudioEncodingProperties EncodingProperties { get; }public AudioEncodingProperties EncodingProperties { get; }Public ReadOnly Property EncodingProperties As AudioEncodingProperties
Value
AudioEncodingProperties AudioEncodingProperties AudioEncodingProperties

Describes the format of the audio stream.

Attributes

Remarks

The application can change the encoding properties of the audio stream descriptor at any time.

If the media pipeline cannot handle the new encoding properties, the MediaStreamSource will raise the Closed event which provides information regarding the error.

IsSelected IsSelected IsSelected

Specifies whether the stream is currently in use by the MediaStreamSource.

public : PlatForm::Boolean IsSelected { get; }public bool IsSelected { get; }Public ReadOnly Property IsSelected As bool
Value
PlatForm::Boolean bool bool

true if the stream is currently in use by the MediaStreamSource; otherwise, false.

Attributes

Remarks

IsSelected is true if the stream represented by the stream descriptor is currently selected by the media pipeline. For example, if it is currently in use by the MediaStreamSource. Otherwise, the value is false.

The MediaStreamSource only raises the SampleRequested event for streams which are selected.

Label Label Label

Prerelease. Gets or sets an app-defined label that identifies an audio stream in a MediaEncodingProfile that contains multiple streams.

public : PlatForm::String Label { get; set; }public string Label { get; set; }Public ReadWrite Property Label As string
Value
PlatForm::String string string

An app-defined label that identifies an audio stream

Attributes
Additional features and requirements
Device family
Windows 10 Insider Preview (introduced v10.0.16225.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v5)

Remarks

The label for each stream in a single MediaEncodingProfile must be unique. Calling SetAudioTracks to add a stream descriptor containing a duplicate label will result in an invalid argument error.

Language Language Language

Gets or sets the RFC-1766 language code for the stream.

public : PlatForm::String Language { get; set; }public string Language { get; set; }Public ReadWrite Property Language As string
Value
PlatForm::String string string

The RFC-1766 language code for the stream.

Attributes

Remarks

The initial value is an empty string.

The language is specified using a RFC-1766 language code, for example, “en-US”.

For more info on RFC-1766 language tags, see the RFC-1766 specification.

LeadingEncoderPadding LeadingEncoderPadding LeadingEncoderPadding

Gets or sets the number of samples inserted at the beginning of the audio stream by the encoder as padding. Use this property to explicitly set the padding size the system will use to implement gapless playback for the audio stream.

public : IReference<uint> LeadingEncoderPadding { get; set; }public Nullable<uint> LeadingEncoderPadding { get; set; }Public ReadWrite Property LeadingEncoderPadding As Nullable<uint>
Value
IReference<unsigned short> Nullable<uint> Nullable<uint>

The number of samples inserted at the beginning of the audio stream by the encoder as padding.

Attributes
Additional features and requirements
Device family
Windows 10 Anniversary Edition (introduced v10.0.14393.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v3)

Name Name Name

Gets or sets the name of the stream.

public : PlatForm::String Name { get; set; }public string Name { get; set; }Public ReadWrite Property Name As string
Value
PlatForm::String string string

The name of the stream.

Attributes

Remarks

The initial value is an empty string.

The name is a free-form human readable string that describes the stream, for example, “English soundtrack”.

TrailingEncoderPadding TrailingEncoderPadding TrailingEncoderPadding

Gets or sets the number of samples inserted at the end of the audio stream by the encoder as padding. Use this property to explicitly set the padding size the system will use to implement gapless playback for the audio stream.

public : IReference<uint> TrailingEncoderPadding { get; set; }public Nullable<uint> TrailingEncoderPadding { get; set; }Public ReadWrite Property TrailingEncoderPadding As Nullable<uint>
Value
IReference<unsigned short> Nullable<uint> Nullable<uint>

The number of samples inserted at the end of the audio stream by the encoder as padding.

Attributes
Additional features and requirements
Device family
Windows 10 Anniversary Edition (introduced v10.0.14393.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v3)

See Also