AudioEncodingProperties Class
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.
Describes the encoding properties of an audio stream.
public ref class AudioEncodingProperties sealed
/// [Windows.Foundation.Metadata.Activatable(65536, Windows.Foundation.UniversalApiContract)]
/// [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 AudioEncodingProperties final
/// [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)]
/// [Windows.Foundation.Metadata.Activatable(65536, "Windows.Foundation.UniversalApiContract")]
class AudioEncodingProperties final
[Windows.Foundation.Metadata.Activatable(65536, typeof(Windows.Foundation.UniversalApiContract))]
[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 AudioEncodingProperties
[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)]
[Windows.Foundation.Metadata.Activatable(65536, "Windows.Foundation.UniversalApiContract")]
public sealed class AudioEncodingProperties
function AudioEncodingProperties()
Public NotInheritable Class AudioEncodingProperties
- Inheritance
- Attributes
- Implements
Device family |
Windows 10 (introduced in 10.0.10240.0)
|
API contract |
Windows.Foundation.UniversalApiContract (introduced in v1.0)
|
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 of 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.
Windows version | SDK version | Value added |
---|---|---|
1703 | 15063 | CreateAlac |
1703 | 15063 | CreateFlac |
1703 | 15063 | IsSpatial |
1803 | 17134 | Copy |
Audio |
Creates a new instance of the AudioEncodingProperties class. |
Bitrate |
Gets or sets the audio bit rate. |
Bits |
Gets or sets the number of bits per audio sample. |
Channel |
Gets or sets the number of audio channels. |
Is |
Gets a value indicating whether the audio is encoded with spatial audio information. |
Properties |
Gets additional format properties for the audio stream. |
Sample |
Gets or sets audio sampling rate. |
Subtype |
Gets or sets the subtype of the format. |
Type |
Gets the format type. |
Copy() |
Creates a copy of the AudioEncodingProperties object. |
Create |
Creates an instance of AudioEncodingProperties for Advanced Audio Coding (AAC) audio. |
Create |
Creates an instance of AudioEncodingProperties for Advanced Audio Coding (AAC) audio in Audio Data Transport Stream (ADTS) format. |
Create |
Creates an instance of AudioEncodingProperties for Apple Lossless Audio Codec (ALAC) audio. |
Create |
Creates an instance of AudioEncodingProperties for Free Lossless Audio Codec (FLAC) audio. |
Create |
Creates an instance of AudioEncodingProperties for MPEG Audio Layer-3 (MP3) audio. |
Create |
Creates an instance of AudioEncodingProperties for Pulse Code Modulation (PCM) audio. |
Create |
Creates an instance of AudioEncodingProperties for Windows Media Audio (WMA). |
Get |
Gets the media format user data. |
Set |
Sets the media format user data. |