AgsBufferUtil

AgsBufferUtil — buffer util

Stability Level

Stable, unless otherwise indicated

Functions

guchar * ags_buffer_util_s8_to_char_buffer ()
guchar * ags_buffer_util_s16_to_char_buffer ()
guchar * ags_buffer_util_s24_to_char_buffer ()
guchar * ags_buffer_util_s32_to_char_buffer ()
guchar * ags_buffer_util_s64_to_char_buffer ()
guchar * ags_buffer_util_float_to_char_buffer ()
guchar * ags_buffer_util_double_to_char_buffer ()
guchar * ags_buffer_util_complex_to_char_buffer ()
gint8 * ags_buffer_util_char_buffer_to_s8 ()
gint16 * ags_buffer_util_char_buffer_to_s16 ()
gint32 * ags_buffer_util_char_buffer_to_s24 ()
gint32 * ags_buffer_util_char_buffer_to_s32 ()
gint64 * ags_buffer_util_char_buffer_to_s64 ()
gfloat * ags_buffer_util_char_buffer_to_float ()
gdouble * ags_buffer_util_char_buffer_to_double ()
AgsComplex * ags_buffer_util_char_buffer_to_complex ()
gint8 ags_buffer_util_char_buffer_read_s8 ()
gint16 ags_buffer_util_char_buffer_read_s16 ()
gint32 ags_buffer_util_char_buffer_read_s24 ()
gint32 ags_buffer_util_char_buffer_read_s32 ()
gint64 ags_buffer_util_char_buffer_read_s64 ()
gfloat ags_buffer_util_char_buffer_read_float ()
gdouble ags_buffer_util_char_buffer_read_double ()
AgsComplex * ags_buffer_util_char_buffer_read_complex ()
void ags_buffer_util_char_buffer_write_s8 ()
void ags_buffer_util_char_buffer_write_s16 ()
void ags_buffer_util_char_buffer_write_s24 ()
void ags_buffer_util_char_buffer_write_s32 ()
void ags_buffer_util_char_buffer_write_s64 ()
void ags_buffer_util_char_buffer_write_float ()
void ags_buffer_util_char_buffer_write_double ()
void ags_buffer_util_char_buffer_write_complex ()
void ags_buffer_util_char_buffer_swap_bytes ()

Object Hierarchy

    GBoxed
    ╰── AgsBufferUtil

Includes

#include <ags/lib/ags_buffer_util.h>

Description

Common utility functions related to char buffers.

Functions

ags_buffer_util_s8_to_char_buffer ()

guchar *
ags_buffer_util_s8_to_char_buffer (gint8 *buffer,
                                   guint buffer_length);

Pack buffer into an guchar buffer.

Parameters

buffer

the gint8 buffer

 

buffer_length

the buffer length

 

Returns

the guchar buffer.

[transfer full]

Since: 3.0.0


ags_buffer_util_s16_to_char_buffer ()

guchar *
ags_buffer_util_s16_to_char_buffer (gint16 *buffer,
                                    guint buffer_length);

Pack buffer into an guchar buffer.

Parameters

buffer

the gint16 buffer

 

buffer_length

the buffer length

 

Returns

the guchar buffer.

[transfer full]

Since: 3.0.0


ags_buffer_util_s24_to_char_buffer ()

guchar *
ags_buffer_util_s24_to_char_buffer (gint32 *buffer,
                                    guint buffer_length);

Pack buffer into an guchar buffer.

Parameters

buffer

the gint32 buffer

 

buffer_length

the buffer length

 

Returns

the guchar buffer.

[transfer full]

Since: 3.0.0


ags_buffer_util_s32_to_char_buffer ()

guchar *
ags_buffer_util_s32_to_char_buffer (gint32 *buffer,
                                    guint buffer_length);

Pack buffer into an guchar buffer.

Parameters

buffer

the gint32 buffer

 

buffer_length

the buffer length

 

Returns

the guchar buffer.

[transfer full]

Since: 3.0.0


ags_buffer_util_s64_to_char_buffer ()

guchar *
ags_buffer_util_s64_to_char_buffer (gint64 *buffer,
                                    guint buffer_length);

Pack buffer into an guchar buffer.

Parameters

buffer

the gint64 buffer

 

buffer_length

the buffer length

 

Returns

the guchar buffer.

[transfer full]

Since: 3.0.0


ags_buffer_util_float_to_char_buffer ()

guchar *
ags_buffer_util_float_to_char_buffer (gfloat *buffer,
                                      guint buffer_length);

Pack buffer into an guchar buffer.

Parameters

buffer

the gfloat buffer

 

buffer_length

the buffer length

 

Returns

the guchar buffer.

[transfer full]

Since: 3.0.0


ags_buffer_util_double_to_char_buffer ()

guchar *
ags_buffer_util_double_to_char_buffer (gdouble *buffer,
                                       guint buffer_length);

Pack buffer into an guchar buffer.

Parameters

buffer

the gdouble buffer

 

buffer_length

the buffer length

 

Returns

the guchar buffer.

[transfer full]

Since: 3.0.0


ags_buffer_util_complex_to_char_buffer ()

guchar *
ags_buffer_util_complex_to_char_buffer
                               (AgsComplex *buffer,
                                guint buffer_length);

Pack buffer into an guchar buffer.

Parameters

buffer

the AgsComplex buffer

 

buffer_length

the buffer length

 

Returns

the guchar buffer.

[transfer full]

Since: 3.0.0


ags_buffer_util_char_buffer_to_s8 ()

gint8 *
ags_buffer_util_char_buffer_to_s8 (guchar *cbuffer,
                                   guint buffer_size);

Unpack cbuffer to a gint8 buffer

Parameters

cbuffer

the guchar buffer

 

buffer_size

the buffer size

 

Returns

the gint8 buffer.

[transfer full]

Since: 3.0.0


ags_buffer_util_char_buffer_to_s16 ()

gint16 *
ags_buffer_util_char_buffer_to_s16 (guchar *cbuffer,
                                    guint buffer_size);

Unpack cbuffer to a gint16 buffer

Parameters

cbuffer

the guchar buffer

 

buffer_size

the buffer size

 

Returns

the gint16 buffer.

[transfer full]

Since: 3.0.0


ags_buffer_util_char_buffer_to_s24 ()

gint32 *
ags_buffer_util_char_buffer_to_s24 (guchar *cbuffer,
                                    guint buffer_size);

Unpack cbuffer to a gint32 buffer

Parameters

cbuffer

the guchar buffer

 

buffer_size

the buffer size

 

Returns

the gint32 buffer.

[transfer full]

Since: 3.0.0


ags_buffer_util_char_buffer_to_s32 ()

gint32 *
ags_buffer_util_char_buffer_to_s32 (guchar *cbuffer,
                                    guint buffer_size);

Unpack cbuffer to a gint32 buffer

Parameters

cbuffer

the guchar buffer

 

buffer_size

the buffer size

 

Returns

the gint32 buffer.

[transfer full]

Since: 3.0.0


ags_buffer_util_char_buffer_to_s64 ()

gint64 *
ags_buffer_util_char_buffer_to_s64 (guchar *cbuffer,
                                    guint buffer_size);

Unpack cbuffer to a gint64 buffer

Parameters

cbuffer

the guchar buffer

 

buffer_size

the buffer size

 

Returns

the gint64 buffer.

[transfer full]

Since: 3.0.0


ags_buffer_util_char_buffer_to_float ()

gfloat *
ags_buffer_util_char_buffer_to_float (guchar *cbuffer,
                                      guint buffer_size);

Unpack cbuffer to a gfloat buffer

Parameters

cbuffer

the guchar buffer

 

buffer_size

the buffer size

 

Returns

the gfloat buffer.

[transfer full]

Since: 3.0.0


ags_buffer_util_char_buffer_to_double ()

gdouble *
ags_buffer_util_char_buffer_to_double (guchar *cbuffer,
                                       guint buffer_size);

Unpack cbuffer to a gdouble buffer

Parameters

cbuffer

the guchar buffer

 

buffer_size

the buffer size

 

Returns

the gdouble buffer.

[transfer full]

Since: 3.0.0


ags_buffer_util_char_buffer_to_complex ()

AgsComplex *
ags_buffer_util_char_buffer_to_complex
                               (guchar *cbuffer,
                                guint buffer_size);

Unpack cbuffer to a AgsComplex buffer

Parameters

cbuffer

the guchar buffer

 

buffer_size

the buffer size

 

Returns

the AgsComplex buffer.

[transfer full]

Since: 3.0.0


ags_buffer_util_char_buffer_read_s8 ()

gint8
ags_buffer_util_char_buffer_read_s8 (guchar *cbuffer,
                                     guint byte_order);

Read a gint8 quantity of cbuffer .

Parameters

cbuffer

the character buffer

 

byte_order

reverse order, ignored here

 

Returns

the gint8 value

Since: 3.0.0


ags_buffer_util_char_buffer_read_s16 ()

gint16
ags_buffer_util_char_buffer_read_s16 (guchar *cbuffer,
                                      guint byte_order);

Read a gint16 quantity of cbuffer .

Parameters

cbuffer

the character buffer

 

byte_order

reverse order

 

Returns

the gint16 value

Since: 3.0.0


ags_buffer_util_char_buffer_read_s24 ()

gint32
ags_buffer_util_char_buffer_read_s24 (guchar *cbuffer,
                                      guint byte_order);

Read a gint32 24 bit quantity of cbuffer .

Parameters

cbuffer

the character buffer

 

byte_order

reverse order

 

Returns

the gint32 value

Since: 3.0.0


ags_buffer_util_char_buffer_read_s32 ()

gint32
ags_buffer_util_char_buffer_read_s32 (guchar *cbuffer,
                                      guint byte_order);

Read a gint32 32 bit quantity of cbuffer .

Parameters

cbuffer

the character buffer

 

byte_order

reverse order

 

Returns

the gint32 value

Since: 3.0.0


ags_buffer_util_char_buffer_read_s64 ()

gint64
ags_buffer_util_char_buffer_read_s64 (guchar *cbuffer,
                                      guint byte_order);

Read a gint64 64 bit quantity of cbuffer .

Parameters

cbuffer

the character buffer

 

byte_order

reverse order

 

Returns

the gint64 value

Since: 3.0.0


ags_buffer_util_char_buffer_read_float ()

gfloat
ags_buffer_util_char_buffer_read_float
                               (guchar *cbuffer,
                                guint byte_order);

Read a gfloat quantity of cbuffer .

Parameters

cbuffer

the character buffer

 

byte_order

reverse order

 

Returns

the gfloat value

Since: 3.0.0


ags_buffer_util_char_buffer_read_double ()

gdouble
ags_buffer_util_char_buffer_read_double
                               (guchar *cbuffer,
                                guint byte_order);

Read a gdouble quantity of cbuffer .

Parameters

cbuffer

the character buffer

 

byte_order

reverse order

 

Returns

the gdouble value

Since: 3.0.0


ags_buffer_util_char_buffer_read_complex ()

AgsComplex *
ags_buffer_util_char_buffer_read_complex
                               (guchar *cbuffer,
                                guint byte_order);

Read a AgsComplex quantity of cbuffer .

Parameters

cbuffer

the character buffer

 

byte_order

reverse order

 

Returns

the AgsComplex value

Since: 3.0.0


ags_buffer_util_char_buffer_write_s8 ()

void
ags_buffer_util_char_buffer_write_s8 (guchar *cbuffer,
                                      gint8 value,
                                      guint byte_order);

Write a gint8 quantity to cbuffer .

Parameters

cbuffer

the character buffer

 

value

the gint8 value

 

byte_order

reverse order

 

Since: 3.0.0


ags_buffer_util_char_buffer_write_s16 ()

void
ags_buffer_util_char_buffer_write_s16 (guchar *cbuffer,
                                       gint16 value,
                                       guint byte_order);

Write a gint16 quantity to cbuffer .

Parameters

cbuffer

the character buffer

 

value

the gint16 value

 

byte_order

reverse order

 

Since: 3.0.0


ags_buffer_util_char_buffer_write_s24 ()

void
ags_buffer_util_char_buffer_write_s24 (guchar *cbuffer,
                                       gint32 value,
                                       guint byte_order);

Write a gint32 quantity to cbuffer .

Parameters

cbuffer

the character buffer

 

value

the gint32 value

 

byte_order

reverse order

 

Since: 3.0.0


ags_buffer_util_char_buffer_write_s32 ()

void
ags_buffer_util_char_buffer_write_s32 (guchar *cbuffer,
                                       gint32 value,
                                       guint byte_order);

Write a gint32 quantity to cbuffer .

Parameters

cbuffer

the character buffer

 

value

the gint32 value

 

byte_order

reverse order

 

Since: 3.0.0


ags_buffer_util_char_buffer_write_s64 ()

void
ags_buffer_util_char_buffer_write_s64 (guchar *cbuffer,
                                       gint64 value,
                                       guint byte_order);

Write a gint64 quantity to cbuffer .

Parameters

cbuffer

the character buffer

 

value

the gint64 value

 

byte_order

reverse order

 

Since: 3.0.0


ags_buffer_util_char_buffer_write_float ()

void
ags_buffer_util_char_buffer_write_float
                               (guchar *cbuffer,
                                gfloat value,
                                guint byte_order);

Write a gfloat quantity to cbuffer .

Parameters

cbuffer

the character buffer

 

value

the gfloat value

 

byte_order

reverse order

 

Since: 3.0.0


ags_buffer_util_char_buffer_write_double ()

void
ags_buffer_util_char_buffer_write_double
                               (guchar *cbuffer,
                                gdouble value,
                                guint byte_order);

Write a gdouble quantity to cbuffer .

Parameters

cbuffer

the character buffer

 

value

the gdouble value

 

byte_order

reverse order

 

Since: 3.0.0


ags_buffer_util_char_buffer_write_complex ()

void
ags_buffer_util_char_buffer_write_complex
                               (guchar *cbuffer,
                                AgsComplex *value,
                                guint byte_order);

Write a AgsComplex quantity to cbuffer .

Parameters

cbuffer

the character buffer

 

value

the AgsComplex value

 

byte_order

reverse order

 

Since: 3.0.0


ags_buffer_util_char_buffer_swap_bytes ()

void
ags_buffer_util_char_buffer_swap_bytes
                               (guchar *cbuffer,
                                guint word_size,
                                guint buffer_size);

Swap bytes in view of Little/Big-Endian.

Parameters

cbuffer

the buffer to swap

 

word_size

the word size

 

buffer_size

the buffer size

 

Since: 3.0.0