AudioEncodingProperties Klasse

Definition

Beschreibt die Codierungseigenschaften eines Audiodatenstroms.

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
Vererbung
Object Platform::Object IInspectable AudioEncodingProperties
Attribute
Implementiert

Windows-Anforderungen

Gerätefamilie
Windows 10 (eingeführt in 10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (eingeführt in v1.0)

Hinweise

Die Codierungsqualität Auto ist eine spezielle Voreinstellung, die die richtigen Einstellungen basierend auf den aktuellen Kameraeinstellungen ausfüllt. Einstellungen, die manuell geändert werden, werden ignoriert. Wenn Sie beispielsweise ein voreingestelltes Profil mit einer der statischen Erstellungsmethoden wie CreateWav erstellen und Auto als Codierungsqualität angeben, werden alle Änderungen, die Sie an den Eigenschaften vornehmen, mit Werten überschrieben, die auf den aktuellen Kameraeinstellungen basieren.

Hinweis

Es ist möglich, audioEncodingProperties zu erstellen, die auf einem bestimmten Gerät nicht unterstützt wird. Beispielsweise können Sie CreateMp3 erfolgreich aufrufen, aber wenn kein mp3-Encoder auf dem Gerät vorhanden ist, schlägt der Versuch, Audio mit den von dieser Methode zurückgegebenen Eigenschaften zu codieren, fehl. Eine Liste der standardmäßig für jede Gerätefamilie vorhandenen Codecs finden Sie unter Unterstützte Codecs.

Anleitungen zum Festlegen der Codierungseigenschaften für aufgezeichnete Audiodaten finden Sie unter Grundlegende Foto-, Video- und Audioaufnahme mit MediaCapture.

Versionsverlauf

Windows-Version SDK-Version Mehrwert
1703 15063 CreateAlac
1703 15063 CreateFlac
1703 15063 IsSpatial
1803 17134 Kopieren

Konstruktoren

AudioEncodingProperties()

Erstellt eine neue instance der AudioEncodingProperties-Klasse.

Eigenschaften

Bitrate

Ruft die Audiobitrate ab oder legt sie fest.

BitsPerSample

Ruft die Anzahl der Bits pro Audiobeispiel ab oder legt diese fest.

ChannelCount

Ruft die Anzahl der Audiokanäle ab oder legt sie fest.

IsSpatial

Ruft einen Wert ab, der angibt, ob das Audio mit räumlichen Audioinformationen codiert ist.

Properties

Ruft zusätzliche Formateigenschaften für den Audiodatenstrom ab.

SampleRate

Ruft die Audiosamplingrate ab oder legt sie fest.

Subtype

Ruft den Untertyp des Formats ab oder legt den Untertyp des Formats fest.

Type

Ruft den Formattyp ab.

Methoden

Copy()

Erstellt eine Kopie des AudioEncodingProperties-Objekts .

CreateAac(UInt32, UInt32, UInt32)

Erstellt eine instance audioEncodingProperties for Advanced Audio Coding (AAC)-Audio.

CreateAacAdts(UInt32, UInt32, UInt32)

Erstellt eine instance audioEncodingProperties for Advanced Audio Coding (AAC)-Audio im ADTS-Format (Audio Data Transport Stream).

CreateAlac(UInt32, UInt32, UInt32)

Erstellt eine instance von AudioEncodingProperties für Apple Lossless Audio Codec (ALAC)-Audio.

CreateFlac(UInt32, UInt32, UInt32)

Erstellt eine instance von AudioEncodingProperties für FLAC-Audio (Free Lossless Audio Codec).

CreateMp3(UInt32, UInt32, UInt32)

Erstellt eine instance audioEncodingProperties für MPEG Audio Layer-3(MP3)-Audio.

CreatePcm(UInt32, UInt32, UInt32)

Erstellt eine instance von AudioEncodingProperties für PCM-Audio (Pulse Code Modulation).

CreateWma(UInt32, UInt32, UInt32)

Erstellt eine instance von AudioEncodingProperties für Windows Media Audio (WMA).

GetFormatUserData(Byte[])

Ruft die Medienformat-Benutzerdaten ab.

SetFormatUserData(Byte[])

Legt die Benutzerdaten im Medienformat fest.

Gilt für:

Weitere Informationen