## AgsCharBufferUtil

AgsCharBufferUtil — util functions to handle char buffer

## Stability Level

Stable, unless otherwise indicated

## Functions

void | ags_char_buffer_util_copy_s8_to_cbuffer ()
void | ags_char_buffer_util_copy_s16_to_cbuffer ()
void | ags_char_buffer_util_copy_s24_to_cbuffer ()
void | ags_char_buffer_util_copy_s32_to_cbuffer ()
void | ags_char_buffer_util_copy_s64_to_cbuffer ()
void | ags_char_buffer_util_copy_float_to_cbuffer ()
void | ags_char_buffer_util_copy_double_to_cbuffer ()
void | ags_char_buffer_util_copy_cbuffer_to_s8 ()
void | ags_char_buffer_util_copy_cbuffer_to_s16 ()
void | ags_char_buffer_util_copy_cbuffer_to_s24 ()
void | ags_char_buffer_util_copy_cbuffer_to_s32 ()
void | ags_char_buffer_util_copy_cbuffer_to_s64 ()
void | ags_char_buffer_util_copy_cbuffer_to_float ()
void | ags_char_buffer_util_copy_cbuffer_to_double ()
void | ags_char_buffer_util_copy_buffer_to_buffer ()

## Types and Values

enum | AgsCharBufferUtilCopyMode

## Object Hierarchy

        GBoxed
        ╰── AgsCharBufferUtil

## Includes

    #include <ags/audio/ags_char_buffer_util.h>

## Description

These utility functions allow you to store/restore PCM data from char buffer.

## Functions

### ags_char_buffer_util_copy_s8_to_cbuffer ()

    void
    ags_char_buffer_util_copy_s8_to_cbuffer
                                   (guchar *destination,
                                    guint word_size,
                                    guint dchannels,
                                    gint8 *source,
                                    guint schannels,
                                    guint frame_count,
                                    guint byte_order);

Copy gint8 to char buffer.

#### Parameters

destination | destination buffer |
word_size | word size |
dchannels | destination channels |
source | source buffer |
schannels | source channels |
frame_count | frame count |
byte_order | the byte-order |

Since: 3.0.0

### ags_char_buffer_util_copy_s16_to_cbuffer ()

    void
    ags_char_buffer_util_copy_s16_to_cbuffer
                                   (guchar *destination,
                                    guint word_size,
                                    guint dchannels,
                                    gint16 *source,
                                    guint schannels,
                                    guint frame_count,
                                    guint byte_order);

Copy gint16 to char buffer.

#### Parameters

destination | destination buffer |
word_size | word size |
dchannels | destination channels |
source | source buffer |
schannels | source channels |
frame_count | frame count |
byte_order | the byte-order |

Since: 3.0.0

### ags_char_buffer_util_copy_s24_to_cbuffer ()

    void
    ags_char_buffer_util_copy_s24_to_cbuffer
                                   (guchar *destination,
                                    guint word_size,
                                    guint dchannels,
                                    gint32 *source,
                                    guint schannels,
                                    guint frame_count,
                                    guint byte_order);

Copy gint32 to char buffer.

#### Parameters

destination | destination buffer |
word_size | word size |
dchannels | destination channels |
source | source buffer |
schannels | source channels |
frame_count | frame count |
byte_order | the byte-order |

Since: 3.0.0

### ags_char_buffer_util_copy_s32_to_cbuffer ()

    void
    ags_char_buffer_util_copy_s32_to_cbuffer
                                   (guchar *destination,
                                    guint word_size,
                                    guint dchannels,
                                    gint32 *source,
                                    guint schannels,
                                    guint frame_count,
                                    guint byte_order);

Copy gint32 to char buffer.

#### Parameters

destination | destination buffer |
word_size | word size |
dchannels | destination channels |
source | source buffer |
schannels | source channels |
frame_count | frame count |
byte_order | the byte-order |

Since: 3.0.0

### ags_char_buffer_util_copy_s64_to_cbuffer ()

    void
    ags_char_buffer_util_copy_s64_to_cbuffer
                                   (guchar *destination,
                                    guint word_size,
                                    guint dchannels,
                                    gint64 *source,
                                    guint schannels,
                                    guint frame_count,
                                    guint byte_order);

Copy gint64 to char buffer.

#### Parameters

destination | destination buffer |
word_size | word size |
dchannels | destination channels |
source | source buffer |
schannels | source channels |
frame_count | frame count |
byte_order | the byte-order |

Since: 3.0.0

### ags_char_buffer_util_copy_float_to_cbuffer ()

    void
    ags_char_buffer_util_copy_float_to_cbuffer
                                   (guchar *destination,
                                    guint word_size,
                                    guint dchannels,
                                    gfloat *source,
                                    guint schannels,
                                    guint frame_count,
                                    guint byte_order);

Copy float to char buffer.

#### Parameters

destination | destination buffer |
word_size | word size |
dchannels | destination channels |
source | source buffer |
schannels | source channels |
frame_count | frame count |
byte_order | the byte-order |

Since: 3.0.0

### ags_char_buffer_util_copy_double_to_cbuffer ()

    void
    ags_char_buffer_util_copy_double_to_cbuffer
                                   (guchar *destination,
                                    guint word_size,
                                    guint dchannels,
                                    gdouble *source,
                                    guint schannels,
                                    guint frame_count,
                                    guint byte_order);

Copy double to char buffer.

#### Parameters

destination | destination buffer |
word_size | word size |
dchannels | destination channels |
source | source buffer |
schannels | source channels |
frame_count | frame count |
byte_order | the byte-order |

Since: 3.0.0

### ags_char_buffer_util_copy_cbuffer_to_s8 ()

    void
    ags_char_buffer_util_copy_cbuffer_to_s8
                                   (gint8 *destination,
                                    guint dchannels,
                                    guchar *source,
                                    guint word_size,
                                    guint schannels,
                                    guint frame_count,
                                    guint byte_order);

Copy char to gint8 buffer.

#### Parameters

destination | destination buffer |
dchannels | destination channels |
source | source buffer |
word_size | word size |
schannels | source channels |
frame_count | frame count |
byte_order | the byte-order |

Since: 3.0.0

### ags_char_buffer_util_copy_cbuffer_to_s16 ()

    void
    ags_char_buffer_util_copy_cbuffer_to_s16
                                   (gint16 *destination,
                                    guint dchannels,
                                    guchar *source,
                                    guint word_size,
                                    guint schannels,
                                    guint frame_count,
                                    guint byte_order);

Copy char to gint16 buffer.

#### Parameters

destination | destination buffer |
dchannels | destination channels |
source | source buffer |
word_size | word size |
schannels | source channels |
frame_count | frame count |
byte_order | the byte-order |

Since: 3.0.0

### ags_char_buffer_util_copy_cbuffer_to_s24 ()

    void
    ags_char_buffer_util_copy_cbuffer_to_s24
                                   (gint32 *destination,
                                    guint dchannels,
                                    guchar *source,
                                    guint word_size,
                                    guint schannels,
                                    guint frame_count,
                                    guint byte_order);

Copy char to gint32 buffer.

#### Parameters

destination | destination buffer |
dchannels | destination channels |
source | source buffer |
word_size | word size |
schannels | source channels |
frame_count | frame count |
byte_order | the byte-order |

Since: 3.0.0

### ags_char_buffer_util_copy_cbuffer_to_s32 ()

    void
    ags_char_buffer_util_copy_cbuffer_to_s32
                                   (gint32 *destination,
                                    guint dchannels,
                                    guchar *source,
                                    guint word_size,
                                    guint schannels,
                                    guint frame_count,
                                    guint byte_order);

Copy char to gint32 buffer.

#### Parameters

destination | destination buffer |
dchannels | destination channels |
source | source buffer |
word_size | word size |
schannels | source channels |
frame_count | frame count |
byte_order | the byte-order |

Since: 3.0.0

### ags_char_buffer_util_copy_cbuffer_to_s64 ()

    void
    ags_char_buffer_util_copy_cbuffer_to_s64
                                   (gint64 *destination,
                                    guint dchannels,
                                    guchar *source,
                                    guint word_size,
                                    guint schannels,
                                    guint frame_count,
                                    guint byte_order);

Copy char to gint64 buffer.

#### Parameters

destination | destination buffer |
dchannels | destination channels |
source | source buffer |
word_size | word size |
schannels | source channels |
frame_count | frame count |
byte_order | the byte-order |

Since: 3.0.0

### ags_char_buffer_util_copy_cbuffer_to_float ()

    void
    ags_char_buffer_util_copy_cbuffer_to_float
                                   (gfloat *destination,
                                    guint dchannels,
                                    gint8 *source,
                                    guint word_size,
                                    guint schannels,
                                    guint frame_count,
                                    guint byte_order);

Copy char to float buffer.

#### Parameters

destination | destination buffer |
dchannels | destination channels |
source | source buffer |
word_size | word size |
schannels | source channels |
frame_count | frame count |
byte_order | the byte-order |

Since: 3.0.0

### ags_char_buffer_util_copy_cbuffer_to_double ()

    void
    ags_char_buffer_util_copy_cbuffer_to_double
                                   (gdouble *destination,
                                    guint dchannels,
                                    guchar *source,
                                    guint word_size,
                                    guint schannels,
                                    guint frame_count,
                                    guint byte_order);

Copy char to double buffer.

#### Parameters

destination | destination buffer |
dchannels | destination channels |
source | source buffer |
word_size | word size |
schannels | source channels |
frame_count | frame count |
byte_order | the byte-order |

Since: 3.0.0

### ags_char_buffer_util_copy_buffer_to_buffer ()

    void
    ags_char_buffer_util_copy_buffer_to_buffer
                                   (void *destination,
                                    guint dchannels,
                                    guint doffset,
                                    void *source,
                                    guint schannels,
                                    guint soffset,
                                    guint frame_count,
                                    guint byte_order,
                                    guint word_size,
                                    AgsCharBufferUtilCopyMode mode);

## Types and Values

### enum AgsCharBufferUtilCopyMode

Copy modes.

#### Members

AGS_CHAR_BUFFER_UTIL_COPY_S8_TO_CBUFFER | copy signed 8 bit to char buffer |
AGS_CHAR_BUFFER_UTIL_COPY_S16_TO_CBUFFER | copy signed 16 bit to char buffer |
AGS_CHAR_BUFFER_UTIL_COPY_S24_TO_CBUFFER | copy signed 24 bit to char buffer |
AGS_CHAR_BUFFER_UTIL_COPY_S32_TO_CBUFFER | copy signed 32 bit to char buffer |
AGS_CHAR_BUFFER_UTIL_COPY_S64_TO_CBUFFER | copy signed 64 bit to char buffer |
AGS_CHAR_BUFFER_UTIL_COPY_FLOAT_TO_CBUFFER | copy float to char buffer |
AGS_CHAR_BUFFER_UTIL_COPY_DOUBLE_TO_CBUFFER | copy double to char buffer |
AGS_CHAR_BUFFER_UTIL_COPY_CBUFFER_TO_S8 | copy char buffer to signed 8 bit |
AGS_CHAR_BUFFER_UTIL_COPY_CBUFFER_TO_S16 | copy char buffer to signed 16 bit |
AGS_CHAR_BUFFER_UTIL_COPY_CBUFFER_TO_S24 | copy char buffer to signed 24 bit |
AGS_CHAR_BUFFER_UTIL_COPY_CBUFFER_TO_S32 | copy char buffer to signed 32 bit |
AGS_CHAR_BUFFER_UTIL_COPY_CBUFFER_TO_S64 | copy char buffer to signed 64 bit |
AGS_CHAR_BUFFER_UTIL_COPY_CBUFFER_TO_FLOAT | copy char buffer to float |
AGS_CHAR_BUFFER_UTIL_COPY_CBUFFER_TO_DOUBLE | copy char buffer to double |