AudioStreamDescriptor AudioStreamDescriptor AudioStreamDescriptor Class

Definition

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 bool IsSelected { get; }public bool IsSelected { get; }Public ReadOnly Property IsSelected As bool
Value
bool 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.

Language Language Language

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

public string Language { get; set; }public string Language { get; set; }Public ReadWrite Property Language As string
Value
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 IReference<uint> LeadingEncoderPadding { get; set; }Public ReadWrite Property LeadingEncoderPadding As IReference<uint>
Value

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

Attributes

Name Name Name

Gets or sets the name of the stream.

public string Name { get; set; }public string Name { get; set; }Public ReadWrite Property Name As string
Value
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 IReference<uint> TrailingEncoderPadding { get; set; }Public ReadWrite Property TrailingEncoderPadding As IReference<uint>
Value

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

Attributes

See Also