Klasse Audio::AudioStreamFormat

Klasse zum Darstellen des Audiodatenstromformats, das für benutzerdefinierte Audioeingabekonfigurationen verwendet wird. Aktualisiert in Version 1.5.0.

Elemente

~AudioStreamFormat

Syntax: public inline virtual ~AudioStreamFormat ( );

Destruktor führt nichts aus.

Operator SPXAUDIOSTREAMFORMATHANDLE

Syntax: public inline explicit operator SPXAUDIOSTREAMFORMATHANDLE ( ) const;

Interner Operator, der zum Abrufen eines zugrunde liegenden Handlewerts verwendet wird.

Rückgaben

Ein Handle.

GetDefaultInputFormat

Syntax: public inline static std::shared_ptr< AudioStreamFormat > GetDefaultInputFormat ( );

Erstellt ein Audiostreamformatobjekt, das das Standard-Audiodatenstromformat (16 kHz, 16 Bit, Mono PCM) darstellt.

Rückgaben

Ein freigegebener Zeiger auf AudioStreamFormat

GetWaveFormat

Syntax: public inline static std::shared_ptr< AudioStreamFormat > GetWaveFormat ( uint32_t samplesPerSecond , uint8_t bitsPerSample , uint8_t channels , AudioStreamWaveFormat waveFormat );

Erstellt ein Audiostreamformatobjekt mit den angegebenen PCM-Wellenformateigenschaften.

Die Parameter

  • samplesPerSecond Beispiele pro Sekunde.

  • bitsPerSample Bits pro Beispiel.

  • channels Anzahl der Kanäle in den Waveform-Audiodaten.

  • waveFormat Das im WAV-Container angegebene Format.

Rückgaben

Ein freigegebener Zeiger auf AudioStreamFormat

GetWaveFormatPCM

Syntax: public inline static std::shared_ptr< AudioStreamFormat > GetWaveFormatPCM ( uint32_t samplesPerSecond , uint8_t bitsPerSample , uint8_t channels );

Erstellt ein Audiostreamformatobjekt mit den angegebenen PCM-Wellenformateigenschaften.

Die Parameter

  • samplesPerSecond Beispiele pro Sekunde.

  • bitsPerSample Bits pro Beispiel.

  • channels Anzahl der Kanäle in den Waveform-Audiodaten.

Rückgaben

Ein freigegebener Zeiger auf AudioStreamFormat

GetDefaultOutputFormat

Syntax: public inline static std::shared_ptr< AudioStreamFormat > GetDefaultOutputFormat ( );

Erstellt ein Audiostreamformatobjekt, das das Standard-Audiodatenstromformat (16 kHz, 16 Bit, Mono PCM) darstellt. In Version 1.4.0 hinzugefügt.

Rückgaben

Ein freigegebener Zeiger auf AudioStreamFormat

GetCompressedFormat

Syntax: public inline static std::shared_ptr< AudioStreamFormat > GetCompressedFormat ( AudioStreamContainerFormat compressedFormat );

Erstellt ein Audiostreamformatobjekt mit dem angegebenen komprimierten Audiocontainerformat, das als Eingabeformat verwendet werden soll. Unterstützung in 1.4.0 hinzugefügt.

Formate werden in der Enumeration "AudioStreamContainerFormat" definiert.

Die Parameter

  • compressedFormat Komprimierter Formattyp.

Rückgaben

Ein freigegebener Zeiger auf AudioStreamFormat.