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)
GType _gType() @property
AudioConverter self()Returns `this`, for use in `with` statements.
bool convert(gstaudio.types.AudioConverterFlags flags, ubyte[] in_, out ubyte[] out_)Convenience wrapper around [gstaudio.audioconverter.AudioConverter.samples], which will perform allocation of the output buffer based on the result from [gstaudio.audioconverter.AudioConverter.getO...
gst.structure.Structure getConfig(out int inRate, out int outRate)Get the current configuration of convert.
size_t getInFrames(size_t outFrames)Calculate how many input frames are currently needed by convert to produce out_frames of output frames.
size_t getMaxLatency()Get 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)Calculate how many output frames can be produced when in_frames input frames are given to convert.
bool isPassthrough()Returns 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()Reset convert to the state it was when it was first created, clearing any history it might currently have.
bool supportsInplace()Returns 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)Set inrate, outrate 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.