AudioEncodingProperties AudioEncodingProperties AudioEncodingProperties AudioEncodingProperties AudioEncodingProperties 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.

[Contains prerelease APIs.]
Describes the encoding properties of an audio stream.

public : sealed class AudioEncodingProperties : IAudioEncodingProperties, IAudioEncodingProperties2, IAudioEncodingPropertiesWithFormatUserData, IMediaEncodingProperties
struct winrt::Windows::Media::MediaProperties::AudioEncodingProperties : IAudioEncodingProperties, IAudioEncodingProperties2, IAudioEncodingPropertiesWithFormatUserData, IMediaEncodingProperties
public sealed class AudioEncodingProperties : IAudioEncodingProperties, IAudioEncodingProperties2, IAudioEncodingPropertiesWithFormatUserData, IMediaEncodingProperties
Public NotInheritable Class AudioEncodingProperties Implements IAudioEncodingProperties, IAudioEncodingProperties2, IAudioEncodingPropertiesWithFormatUserData, IMediaEncodingProperties
var audioEncodingProperties = new audioEncodingProperties();
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Remarks

The encoding quality Auto is a special preset that fills in the proper settings based on the current camera settings. Settings that are manually modified are ignored. For example, if you create a preset profile using one the static create methods, such as CreateWav, and specify Auto as the encoding quality, any changes you make to the properties will be overwritten with values based on the current camera settings.

Note

It is possible to create an AudioEncodingProperties that is not supported on a particular device. For example, you may successfully call CreateMp3, but if an mp3 encoder is not present on the device, attempting to encode audio with the properties returned from this method will fail. For a list of the codecs present by default for each device family, see Supported codecs..

For how-to guidance for setting the encoding properties for captured audio, see Basic photo, video, and audio capture with MediaCapture.

Constructors

AudioEncodingProperties() AudioEncodingProperties() AudioEncodingProperties() AudioEncodingProperties() AudioEncodingProperties()

Creates a new instance of the AudioEncodingProperties class.

Properties

Bitrate Bitrate Bitrate Bitrate Bitrate

Gets or sets the audio bit rate.

BitsPerSample BitsPerSample BitsPerSample BitsPerSample BitsPerSample

Gets or sets the number of bits per audio sample.

ChannelCount ChannelCount ChannelCount ChannelCount ChannelCount

Gets or sets the number of audio channels.

IsSpatial IsSpatial IsSpatial IsSpatial IsSpatial

Gets a value indicating whether the audio is encoded with spatial audio information.

Properties Properties Properties Properties Properties

Gets additional format properties for the audio stream.

SampleRate SampleRate SampleRate SampleRate SampleRate

Gets or sets audio sampling rate.

Subtype Subtype Subtype Subtype Subtype

Gets or sets the subtype of the format.

Type Type Type Type Type

Gets the format type.

Methods

Copy() Copy() Copy() Copy() Copy()

Prerelease. Creates a copy of the AudioEncodingProperties object.

CreateAac(UInt32, UInt32, UInt32) CreateAac(UInt32, UInt32, UInt32) CreateAac(UInt32, UInt32, UInt32) CreateAac(UInt32, UInt32, UInt32) CreateAac(UInt32, UInt32, UInt32)

Creates an instance of AudioEncodingProperties for Advanced Audio Coding (AAC) audio.

CreateAacAdts(UInt32, UInt32, UInt32) CreateAacAdts(UInt32, UInt32, UInt32) CreateAacAdts(UInt32, UInt32, UInt32) CreateAacAdts(UInt32, UInt32, UInt32) CreateAacAdts(UInt32, UInt32, UInt32)

Creates an instance of AudioEncodingProperties for Advanced Audio Coding (AAC) audio in Audio Data Transport Stream (ADTS) format.

CreateAlac(UInt32, UInt32, UInt32) CreateAlac(UInt32, UInt32, UInt32) CreateAlac(UInt32, UInt32, UInt32) CreateAlac(UInt32, UInt32, UInt32) CreateAlac(UInt32, UInt32, UInt32)

Creates an instance of AudioEncodingProperties for Apple Lossless Audio Codec (ALAC) audio.

CreateFlac(UInt32, UInt32, UInt32) CreateFlac(UInt32, UInt32, UInt32) CreateFlac(UInt32, UInt32, UInt32) CreateFlac(UInt32, UInt32, UInt32) CreateFlac(UInt32, UInt32, UInt32)

Creates an instance of AudioEncodingProperties for Free Lossless Audio Codec (FLAC) audio.

CreateMp3(UInt32, UInt32, UInt32) CreateMp3(UInt32, UInt32, UInt32) CreateMp3(UInt32, UInt32, UInt32) CreateMp3(UInt32, UInt32, UInt32) CreateMp3(UInt32, UInt32, UInt32)

Creates an instance of AudioEncodingProperties for MPEG Audio Layer-3 (MP3) audio.

CreatePcm(UInt32, UInt32, UInt32) CreatePcm(UInt32, UInt32, UInt32) CreatePcm(UInt32, UInt32, UInt32) CreatePcm(UInt32, UInt32, UInt32) CreatePcm(UInt32, UInt32, UInt32)

Creates an instance of AudioEncodingProperties for Pulse Code Modulation (PCM) audio.

CreateWma(UInt32, UInt32, UInt32) CreateWma(UInt32, UInt32, UInt32) CreateWma(UInt32, UInt32, UInt32) CreateWma(UInt32, UInt32, UInt32) CreateWma(UInt32, UInt32, UInt32)

Creates an instance of AudioEncodingProperties for Windows Media Audio (WMA).

GetFormatUserData(Byte[]) GetFormatUserData(Byte[]) GetFormatUserData(Byte[]) GetFormatUserData(Byte[]) GetFormatUserData(Byte[])

Gets the media format user data.

SetFormatUserData(Byte[]) SetFormatUserData(Byte[]) SetFormatUserData(Byte[]) SetFormatUserData(Byte[]) SetFormatUserData(Byte[])

Sets the media format user data.

See Also