gstaudio.audio_converter

Module for [AudioConverter] class

Types 1

This object is used to convert audio samples from one format to another. The object can perform conversion of:

  • audio format with optional dithering and noise shaping
  • audio samplerate
  • audio channels and channel layout
Methods
void * _cPtr(Flag!"Dup" dup = No.Dup) nothrow
GType _getGType() static nothrow
GType _gType() @property nothrow
AudioConverter self() nothrowReturns `this`, for use in `with` statements.
bool convert(gstaudio.types.AudioConverterFlags flags, ubyte[] in_, out ubyte[] out_) nothrowConvenience wrapper around [gstaudio.audio_converter.AudioConverter.samples], which will perform allocation of the output buffer based on the result from [gstaudio.audio_converter.AudioConverter.ge...
gst.structure.Structure getConfig(out int inRate, out int outRate) nothrowGet the current configuration of convert.
size_t getInFrames(size_t outFrames) nothrowCalculate how many input frames are currently needed by convert to produce out_frames of output frames.
size_t getMaxLatency() nothrowGet the maximum number of input frames that the converter would need before producing output. Returns: the latency of convert as expressed in the number of frames.
size_t getOutFrames(size_t inFrames) nothrowCalculate how many output frames can be produced when in_frames input frames are given to convert.
bool isPassthrough() nothrowReturns whether the audio converter will operate in passthrough mode. The return value would be typically input to [gstbase.base_transform.BaseTransform.setPassthrough] Returns: true when no conver...
void reset() nothrowReset convert to the state it was when it was first created, clearing any history it might currently have.
bool supportsInplace() nothrowReturns whether the audio converter can perform the conversion in-place. The return value would be typically input to [gstbase.base_transform.BaseTransform.setInPlace] Returns: true when the conver...
bool updateConfig(int inRate, int outRate, gst.structure.Structure config = null) nothrowSet in_rate, out_rate and config as extra configuration for convert.
Constructors
this(void * ptr, Flag!"Take" take)
this(gstaudio.types.AudioConverterFlags flags, gstaudio.audio_info.AudioInfo inInfo, gstaudio.audio_info.AudioInfo outInfo, gst.structure.Structure config = null)Create a new #GstAudioConverter that is able to convert between in and out audio formats.