AudioConverter

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

Constructors

this
this(gstaudio.types.AudioConverterFlags flags, gstaudio.audio_info.AudioInfo inInfo, gstaudio.audio_info.AudioInfo outInfo, gst.structure.Structure config)

Create a new #GstAudioConverter that is able to convert between in and out audio formats.

Members

Functions

convert
bool convert(gstaudio.types.AudioConverterFlags flags, ubyte[] in_, ubyte[] out_)

Convenience wrapper around gstaudio.audio_converter.AudioConverter.samples, which will perform allocation of the output buffer based on the result from gstaudio.audio_converter.AudioConverter.getOutFrames.

getConfig
gst.structure.Structure getConfig(int inRate, int outRate)

Get the current configuration of convert.

getInFrames
size_t getInFrames(size_t outFrames)

Calculate how many input frames are currently needed by convert to produce out_frames of output frames.

getMaxLatency
size_t getMaxLatency()

Get the maximum number of input frames that the converter would need before producing output.

getOutFrames
size_t getOutFrames(size_t inFrames)

Calculate how many output frames can be produced when in_frames input frames are given to convert.

isPassthrough
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

reset
void reset()

Reset convert to the state it was when it was first created, clearing any history it might currently have.

supportsInplace
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

updateConfig
bool updateConfig(int inRate, int outRate, gst.structure.Structure config)

Set in_rate, out_rate and config as extra configuration for convert.

Inherited Members

From Boxed

cInstancePtr
void* cInstancePtr;

Pointer to the C boxed value

getType
GType getType()

Get the GType of this boxed type.

gType
GType gType [@property getter]

Boxed GType property.

self
Boxed self()

Convenience method to return this cast to a type. For use in D with statements.

copy_
void* copy_()

Make a copy of the wrapped C boxed data.

boxedCopy
void* boxedCopy(void* cBoxed)

Copy a C boxed value using g_boxed_copy.

boxedFree
void boxedFree(void* cBoxed)

Free a C boxed value using g_boxed_free.