## AgsOscBufferUtil

AgsOscBufferUtil — OSC buffer util

## Stability Level

Stable, unless otherwise indicated

## Functions

AgsOscBufferUtil * | ags_osc_buffer_util_alloc ()
void | ags_osc_buffer_util_free ()
AgsOscBufferUtil * | ags_osc_buffer_util_copy ()
void | ags_osc_buffer_util_put_int32 ()
void | ags_osc_buffer_util_get_int32 ()
void | ags_osc_buffer_util_put_timetag ()
void | ags_osc_buffer_util_get_timetag ()
void | ags_osc_buffer_util_put_float ()
void | ags_osc_buffer_util_get_float ()
void | ags_osc_buffer_util_put_string ()
void | ags_osc_buffer_util_get_string ()
void | ags_osc_buffer_util_put_blob ()
void | ags_osc_buffer_util_get_blob ()
void | ags_osc_buffer_util_put_int64 ()
void | ags_osc_buffer_util_get_int64 ()
void | ags_osc_buffer_util_put_double ()
void | ags_osc_buffer_util_get_double ()
void | ags_osc_buffer_util_put_char ()
void | ags_osc_buffer_util_get_char ()
void | ags_osc_buffer_util_put_rgba ()
void | ags_osc_buffer_util_get_rgba ()
void | ags_osc_buffer_util_put_midi ()
void | ags_osc_buffer_util_get_midi ()
void | ags_osc_buffer_util_put_packet ()
void | ags_osc_buffer_util_get_packet ()
void | ags_osc_buffer_util_put_packets ()
void | ags_osc_buffer_util_put_message ()
void | ags_osc_buffer_util_get_message ()
void | ags_osc_buffer_util_put_bundle ()
void | ags_osc_buffer_util_get_bundle ()

## Object Hierarchy

        GBoxed
        ╰── AgsOscBufferUtil

## Includes

    #include <ags/audio/osc/ags_osc_buffer_util.h>

## Description

Utility functions for OSC buffer.

## Functions

### ags_osc_buffer_util_alloc ()

    AgsOscBufferUtil *
    ags_osc_buffer_util_alloc ();

Allocate OSC util.

#### Returns

the newly allocated AgsOscBufferUtil.

[transfer full]

Since: 6.0.0

### ags_osc_buffer_util_free ()

    void
    ags_osc_buffer_util_free (AgsOscBufferUtil *osc_buffer_util);

Free OSC util.

#### Parameters

osc_buffer_util | the OSC util |

Since: 6.0.0

### ags_osc_buffer_util_copy ()

    AgsOscBufferUtil *
    ags_osc_buffer_util_copy (AgsOscBufferUtil *osc_buffer_util);

Copy OSC util.

#### Parameters

osc_buffer_util | the OSC util |

#### Returns

the newly allocated AgsOscBufferUtil.

[transfer full]

Since: 6.0.0

### ags_osc_buffer_util_put_int32 ()

    void
    ags_osc_buffer_util_put_int32 (AgsOscBufferUtil *osc_buffer_util,
                                   guchar *buffer,
                                   gint32 val);

Put `val` in `buffer` .

#### Parameters

osc_buffer_util | the OSC util |
buffer | the guchar buffer |
val | the 32 bit integer value |

Since: 3.0.0

### ags_osc_buffer_util_get_int32 ()

    void
    ags_osc_buffer_util_get_int32 (AgsOscBufferUtil *osc_buffer_util,
                                   guchar *buffer,
                                   gint32 *val);

Get `val` from `buffer` .

#### Parameters

osc_buffer_util | the OSC util |
buffer | the guchar buffer |
val | return location of the 32 bit integer value |

Since: 3.0.0

### ags_osc_buffer_util_put_timetag ()

    void
    ags_osc_buffer_util_put_timetag (AgsOscBufferUtil *osc_buffer_util,
                                     guchar *buffer,
                                     gint32 tv_secs,
                                     gint32 tv_fraction,
                                     gboolean immediately);

Put timetag specified by `tv_secs` , `tv_fraction` and `immediately` to `buffer` .

#### Parameters

osc_buffer_util | the OSC util |
buffer | the guchar buffer |
tv_secs | number of seconds since midnight on January 1, 1900 |
tv_fraction | fraction of seconds to a precision of about 200 picoseconds |
immediately | if `TRUE` apply immediately, otherwise `FALSE` not immediately |

Since: 3.0.0

### ags_osc_buffer_util_get_timetag ()

    void
    ags_osc_buffer_util_get_timetag (AgsOscBufferUtil *osc_buffer_util,
                                     guchar *buffer,
                                     gint32 *tv_secs,
                                     gint32 *tv_fraction,
                                     gboolean *immediately);

Get timetag specified by `tv_secs` , `tv_fraction` and `immediately` from `buffer` .

#### Parameters

osc_buffer_util | the OSC util |
buffer | the guchar buffer |
tv_secs | return location of number of seconds since midnight on January 1, 1900 |
tv_fraction | return location of fraction of seconds to a precision of about 200 picoseconds |
immediately | return location of if `TRUE` apply immediately, otherwise `FALSE` not immediately |

Since: 3.0.0

### ags_osc_buffer_util_put_float ()

    void
    ags_osc_buffer_util_put_float (AgsOscBufferUtil *osc_buffer_util,
                                   guchar *buffer,
                                   gfloat val);

Put `val` to `buffer` .

#### Parameters

osc_buffer_util | the OSC util |
buffer | the guchar buffer |
val | the float value |

Since: 3.0.0

### ags_osc_buffer_util_get_float ()

    void
    ags_osc_buffer_util_get_float (AgsOscBufferUtil *osc_buffer_util,
                                   guchar *buffer,
                                   gfloat *val);

Get `val` from `buffer` .

#### Parameters

osc_buffer_util | the OSC util |
buffer | the guchar buffer |
val | the float value |

Since: 3.0.0

### ags_osc_buffer_util_put_string ()

    void
    ags_osc_buffer_util_put_string (AgsOscBufferUtil *osc_buffer_util,
                                    guchar *buffer,
                                    gchar *str,
                                    gsize length);

Put `str` to `buffer` .

#### Parameters

osc_buffer_util | the OSC util |
buffer | the guchar buffer |
str | the ASCII string |
length | the length to write or -1 to write until null byte |

Since: 3.0.0

### ags_osc_buffer_util_get_string ()

    void
    ags_osc_buffer_util_get_string (AgsOscBufferUtil *osc_buffer_util,
                                    guchar *buffer,
                                    gchar **str,
                                    gsize *length);

Get `str` from `buffer` .

#### Parameters

osc_buffer_util | the OSC util |
buffer | the guchar buffer |
str | the return location of ASCII string |
length | the return location of bytes read |

Since: 3.0.0

### ags_osc_buffer_util_put_blob ()

    void
    ags_osc_buffer_util_put_blob (AgsOscBufferUtil *osc_buffer_util,
                                  guchar *buffer,
                                  gint32 data_size,
                                  guchar *data);

Put `data` to `buffer` .

#### Parameters

osc_buffer_util | the OSC util |
buffer | the guchar buffer |
data_size | the blob's data size |
data | the blob's data |

Since: 3.0.0

### ags_osc_buffer_util_get_blob ()

    void
    ags_osc_buffer_util_get_blob (AgsOscBufferUtil *osc_buffer_util,
                                  guchar *buffer,
                                  gint32 *data_size,
                                  guchar **data);

Get `data` from `buffer` .

#### Parameters

osc_buffer_util | the OSC util |
buffer | the guchar buffer |
data_size | the return location of blob's data size |
data | the return location of blob's data |

Since: 3.0.0

### ags_osc_buffer_util_put_int64 ()

    void
    ags_osc_buffer_util_put_int64 (AgsOscBufferUtil *osc_buffer_util,
                                   guchar *buffer,
                                   gint64 val);

Put `val` to `buffer` .

#### Parameters

osc_buffer_util | the OSC util |
buffer | the guchar buffer |
val | the 64 bit integer |

Since: 3.0.0

### ags_osc_buffer_util_get_int64 ()

    void
    ags_osc_buffer_util_get_int64 (AgsOscBufferUtil *osc_buffer_util,
                                   guchar *buffer,
                                   gint64 *val);

Get `val` from `buffer` .

#### Parameters

osc_buffer_util | the OSC util |
buffer | the guchar buffer |
val | the return location of 64 bit integer |

Since: 3.0.0

### ags_osc_buffer_util_put_double ()

    void
    ags_osc_buffer_util_put_double (AgsOscBufferUtil *osc_buffer_util,
                                    guchar *buffer,
                                    gdouble val);

Put `val` to `buffer` .

#### Parameters

osc_buffer_util | the OSC util |
buffer | the guchar buffer |
val | the double floating point value |

Since: 3.0.0

### ags_osc_buffer_util_get_double ()

    void
    ags_osc_buffer_util_get_double (AgsOscBufferUtil *osc_buffer_util,
                                    guchar *buffer,
                                    gdouble *val);

Get `val` from `buffer` .

#### Parameters

osc_buffer_util | the OSC util |
buffer | the guchar buffer |
val | the return location of double floating point value |

Since: 3.0.0

### ags_osc_buffer_util_put_char ()

    void
    ags_osc_buffer_util_put_char (AgsOscBufferUtil *osc_buffer_util,
                                  guchar *buffer,
                                  gchar val);

Put `val` to `buffer` .

#### Parameters

osc_buffer_util | the OSC util |
buffer | the guchar buffer |
val | the ASCII char |

Since: 3.0.0

### ags_osc_buffer_util_get_char ()

    void
    ags_osc_buffer_util_get_char (AgsOscBufferUtil *osc_buffer_util,
                                  guchar *buffer,
                                  gchar *val);

Get `val` from `buffer` .

#### Parameters

osc_buffer_util | the OSC util |
buffer | the guchar buffer |
val | the return location of ASCII char |

Since: 3.0.0

### ags_osc_buffer_util_put_rgba ()

    void
    ags_osc_buffer_util_put_rgba (AgsOscBufferUtil *osc_buffer_util,
                                  guchar *buffer,
                                  guint8 r,
                                  guint8 g,
                                  guint8 b,
                                  guint8 a);

Put RGBA color specified by `r` , `g` , `b` and `a` to `buffer` .

#### Parameters

osc_buffer_util | the OSC util |
buffer | the guchar buffer |
r | the red value |
g | the green value |
b | the blue value |
a | the alpha value |

Since: 3.0.0

### ags_osc_buffer_util_get_rgba ()

    void
    ags_osc_buffer_util_get_rgba (AgsOscBufferUtil *osc_buffer_util,
                                  guchar *buffer,
                                  guint8 *r,
                                  guint8 *g,
                                  guint8 *b,
                                  guint8 *a);

Get RGBA color specified by `r` , `g` , `b` and `a` from `buffer` .

#### Parameters

osc_buffer_util | the OSC util |
buffer | the guchar buffer |
r | the return location of red value |
g | the return location of green value |
b | the return location of blue value |
a | the return location of alpha value |

Since: 3.0.0

### ags_osc_buffer_util_put_midi ()

    void
    ags_osc_buffer_util_put_midi (AgsOscBufferUtil *osc_buffer_util,
                                  guchar *buffer,
                                  guint8 port,
                                  guint8 status_byte,
                                  guint8 data0,
                                  guint8 data1);

Put MIDI to `buffer` .

#### Parameters

osc_buffer_util | the OSC util |
buffer | the guchar buffer |
port | the port |
status_byte | the status byte |
data0 | the first piece of data |
data1 | the second piece of data |

Since: 3.0.0

### ags_osc_buffer_util_get_midi ()

    void
    ags_osc_buffer_util_get_midi (AgsOscBufferUtil *osc_buffer_util,
                                  guchar *buffer,
                                  guint8 *port,
                                  guint8 *status_byte,
                                  guint8 *data0,
                                  guint8 *data1);

Get MIDI from `buffer` .

#### Parameters

osc_buffer_util | the OSC util |
buffer | the guchar buffer |
port | the return location of port |
status_byte | the return location of status byte |
data0 | the return location of first piece of data |
data1 | the return location of second piece of data |

Since: 3.0.0

### ags_osc_buffer_util_put_packet ()

    void
    ags_osc_buffer_util_put_packet (AgsOscBufferUtil *osc_buffer_util,
                                    guchar *buffer,
                                    gint32 packet_size,
                                    guchar *packet);

Put `packet` to `buffer` .

#### Parameters

osc_buffer_util | the OSC util |
buffer | the guchar buffer |
packet_size | the packet's size |
packet | the packet |

Since: 3.0.0

### ags_osc_buffer_util_get_packet ()

    void
    ags_osc_buffer_util_get_packet (AgsOscBufferUtil *osc_buffer_util,
                                    guchar *buffer,
                                    gint32 *packet_size,
                                    guchar **packet);

Get `packet` from `buffer` .

#### Parameters

osc_buffer_util | the OSC util |
buffer | the guchar buffer |
packet_size | the return location of packet's size |
packet | the return location of packet |

Since: 3.0.0

### ags_osc_buffer_util_put_packets ()

    void
    ags_osc_buffer_util_put_packets (AgsOscBufferUtil *osc_buffer_util,
                                     guchar *buffer,
                                     gint32 packet_size,
                                     ...);

Put packets to `buffer` .

#### Parameters

osc_buffer_util | the OSC util |
buffer | the guchar buffer |
packet_size | the packet size or -1 if no packet |
... | the packets followed by packet size until it is -1 |

Since: 3.0.0

### ags_osc_buffer_util_put_message ()

    void
    ags_osc_buffer_util_put_message (AgsOscBufferUtil *osc_buffer_util,
                                     guchar *buffer,
                                     gchar *address_pattern,
                                     gchar *type_tag);

Put message heading to `buffer` . Note you have to put following arguments yourself.

#### Parameters

osc_buffer_util | the OSC util |
buffer | the guchar buffer |
address_pattern | the address pattern |
type_tag | the type tag |

Since: 3.0.0

### ags_osc_buffer_util_get_message ()

    void
    ags_osc_buffer_util_get_message (AgsOscBufferUtil *osc_buffer_util,
                                     guchar *buffer,
                                     gchar **address_pattern,
                                     gchar **type_tag);

Get message heading from `buffer` . Note you have to get following arguments yourself.

#### Parameters

osc_buffer_util | the OSC util |
buffer | the guchar buffer |
address_pattern | return location of the address pattern |
type_tag | return location of the type tag |

Since: 3.0.0

### ags_osc_buffer_util_put_bundle ()

    void
    ags_osc_buffer_util_put_bundle (AgsOscBufferUtil *osc_buffer_util,
                                    guchar *buffer,
                                    gint32 tv_secs,
                                    gint32 tv_fraction,
                                    gboolean immediately);

Put bundle to `buffer` .

#### Parameters

osc_buffer_util | the OSC util |
buffer | the guchar buffer |
tv_secs | number of seconds since midnight on January 1, 1900 |
tv_fraction | fraction of seconds to a precision of about 200 picoseconds |
immediately | if `TRUE` apply immediately, otherwise `FALSE` not immediately |

Since: 3.0.0

### ags_osc_buffer_util_get_bundle ()

    void
    ags_osc_buffer_util_get_bundle (AgsOscBufferUtil *osc_buffer_util,
                                    guchar *buffer,
                                    gint32 *tv_secs,
                                    gint32 *tv_fraction,
                                    gboolean *immediately);

Get bundle from `buffer` .

#### Parameters

osc_buffer_util | the OSC util |
buffer | the guchar buffer |
tv_secs | return location of number of seconds since midnight on January 1, 1900 |
tv_fraction | return location of fraction of seconds to a precision of about 200 picoseconds |
immediately | return location of if `TRUE` apply immediately, otherwise `FALSE` not immediately |

Since: 3.0.0