Converter
Object Hierarchy:
Description:
[ CCode ( copy_function = "g_boxed_copy" , free_function = "g_boxed_free" , type_id = "gst_audio_converter_get_type ()" ) ]
[ Compact ]
[ GIR ( name = "AudioConverter" ) ]
[ Version ( since = "1.8" ) ]
public class Converter
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
Content:
Creation methods:
Methods:
- public bool convert (ConverterFlags flags, uint8[] @in, out uint8[] @out)
Convenience wrapper around
samples, which will perform allocation of the output buffer based on the
result from get_out_frames.
- public void free ()
Free a previously allocated this
instance.
- public unowned Structure get_config (out int in_rate, out int out_rate)
Get the current configuration of this
.
- public size_t get_in_frames (size_t out_frames)
Calculate how many input frames are currently needed by
this to produce out_frames
of output frames.
- public size_t get_max_latency ()
Get the maximum number of input frames that the converter would need
before producing output.
- public size_t get_out_frames (size_t in_frames)
Calculate how many output frames can be produced when in_frames
input frames are given to this.
- public bool is_passthrough ()
Returns whether the audio converter will operate in passthrough mode.
- public void reset ()
Reset this to the state it was when
it was first created, clearing any history it might currently have.
- public bool samples (ConverterFlags flags, void* @in, size_t in_frames, void* @out, size_t out_frames)
Perform the conversion with in_frames
in in
to out_frames
in out
using this.
- public bool supports_inplace ()
Returns whether the audio converter can perform the conversion
in-place.
- public bool update_config (int in_rate, int out_rate, owned Structure? config)
Set in_rate
, out_rate
and config
as extra configuration for this.