gstaudio.audio_buffer

Module for [AudioBuffer] class

Types 1

A structure containing the result of an audio buffer map operation, which is executed with [gstaudio.audio_buffer.AudioBuffer.map]. For non-interleaved (planar) buffers, the beginning of each channel in the buffer has its own pointer in the @planes array. For interleaved buffers, the @planes array only contains one item, which is the pointer to the beginning of the buffer, and @n_planes equals 1.

The different channels in @planes are always in the GStreamer channel order.

Fields
GstAudioBuffer _cInstance
Methods
void * _cPtr()
gstaudio.audio_info.AudioInfo info() @propertyGet `info` field. Returns: a #GstAudioInfo describing the audio properties of this buffer
size_t nSamples() @propertyGet `nSamples` field. Returns: the size of the buffer in samples
void nSamples(size_t propval) @propertySet `nSamples` field. Params: propval = the size of the buffer in samples
int nPlanes() @propertyGet `nPlanes` field. Returns: the number of planes available
void nPlanes(int propval) @propertySet `nPlanes` field. Params: propval = the number of planes available
gst.buffer.Buffer buffer() @propertyGet `buffer` field. Returns: the mapped buffer
void buffer(gst.buffer.Buffer propval) @propertySet `buffer` field. Params: propval = the mapped buffer
void unmap()Unmaps an audio buffer that was previously mapped with [gstaudio.audio_buffer.AudioBuffer.map].
gst.buffer.Buffer clip(gst.buffer.Buffer buffer, gst.segment.Segment segment, int rate, int bpf)Clip the buffer to the given [gst.segment.Segment].
bool map(out gstaudio.audio_buffer.AudioBuffer buffer, gstaudio.audio_info.AudioInfo info, gst.buffer.Buffer gstbuffer, gst.types.MapFlags flags)Maps an audio gstbuffer so that it can be read or written and stores the result of the map operation in buffer.
bool reorderChannels(gst.buffer.Buffer buffer, gstaudio.types.AudioFormat format, gstaudio.types.AudioChannelPosition[] from, gstaudio.types.AudioChannelPosition[] to)Reorders buffer from the channel positions from to the channel positions to. from and to must contain the same number of positions and the same positions, only in a different order. buffer must be ...
gst.buffer.Buffer truncate(gst.buffer.Buffer buffer, int bpf, size_t trim, size_t samples)Truncate the buffer to finally have samples number of samples, removing the necessary amount of samples from the end and trim number of samples from the beginning.
Constructors
this(void * ptr, Flag!"Take" take)