## AgsOscUtil

AgsOscUtil — OSC util

## Stability Level

Stable, unless otherwise indicated

## Functions

AgsOscUtil * | ags_osc_util_alloc ()
void | ags_osc_util_free ()
AgsOscUtil * | ags_osc_util_copy ()
guint | ags_osc_util_type_tag_string_count_type ()
guchar * | ags_osc_util_meta_data ()
guchar * | ags_osc_util_mime_header ()
guchar * | ags_osc_util_slip_encode ()
guchar * | ags_osc_util_slip_decode ()
void | ags_osc_util_timetag_now ()

## Types and Values

#define | AGS_OSC_UTIL_TYPE_TAG_STRING_INT32
#define | AGS_OSC_UTIL_TYPE_TAG_STRING_FLOAT
#define | AGS_OSC_UTIL_TYPE_TAG_STRING_STRING
#define | AGS_OSC_UTIL_TYPE_TAG_STRING_BLOB
#define | AGS_OSC_UTIL_TYPE_TAG_STRING_INT64
#define | AGS_OSC_UTIL_TYPE_TAG_STRING_TIMETAG
#define | AGS_OSC_UTIL_TYPE_TAG_STRING_DOUBLE
#define | AGS_OSC_UTIL_TYPE_TAG_STRING_SYMBOL
#define | AGS_OSC_UTIL_TYPE_TAG_STRING_CHAR
#define | AGS_OSC_UTIL_TYPE_TAG_STRING_RGBA
#define | AGS_OSC_UTIL_TYPE_TAG_STRING_MIDI
#define | AGS_OSC_UTIL_TYPE_TAG_STRING_TRUE
#define | AGS_OSC_UTIL_TYPE_TAG_STRING_FALSE
#define | AGS_OSC_UTIL_TYPE_TAG_STRING_NIL
#define | AGS_OSC_UTIL_TYPE_TAG_STRING_INFINITE
#define | AGS_OSC_UTIL_TYPE_TAG_STRING_ARRAY_START
#define | AGS_OSC_UTIL_TYPE_TAG_STRING_ARRAY_END
#define | AGS_OSC_UTIL_TYPE_TAG_STRING_ALL
#define | AGS_OSC_UTIL_ADDRESS_PATTERN_VALID_CHARS_PATTERN
#define | AGS_OSC_UTIL_SLIP_CHUNK_LENGTH
#define | AGS_OSC_UTIL_SLIP_END
#define | AGS_OSC_UTIL_SLIP_ESC
#define | AGS_OSC_UTIL_SLIP_ESC_END
#define | AGS_OSC_UTIL_SLIP_ESC_ESC

## Object Hierarchy

        GBoxed
        ╰── AgsOscUtil

## Includes

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

## Description

Utility functions for OSC.

## Functions

### ags_osc_util_alloc ()

    AgsOscUtil *
    ags_osc_util_alloc ();

Allocate OSC util.

#### Returns

the newly allocated AgsOscUtil.

[transfer full]

Since: 6.0.0

### ags_osc_util_free ()

    void
    ags_osc_util_free (AgsOscUtil *osc_util);

Free OSC util.

#### Parameters

osc_util | the OSC util |

Since: 6.0.0

### ags_osc_util_copy ()

    AgsOscUtil *
    ags_osc_util_copy (AgsOscUtil *osc_util);

Copy OSC util.

#### Parameters

osc_util | the OSC util |

#### Returns

the newly allocated AgsOscUtil.

[transfer full]

Since: 6.0.0

### ags_osc_util_type_tag_string_count_type ()

    guint
    ags_osc_util_type_tag_string_count_type
                                   (gchar *type_tag);

Count types in `type_tag` .

#### Parameters

type_tag | the type tag string |

#### Returns

the count of types specified

Since: 3.0.0

### ags_osc_util_meta_data ()

    guchar *
    ags_osc_util_meta_data (gchar *uri,
                            guint *meta_data_length);

Get meta data.

#### Parameters

uri | the URI |
meta_data_length | the return location of meta data's length |

#### Returns

the byte array containing meta data

Since: 3.0.0

### ags_osc_util_mime_header ()

    guchar *
    ags_osc_util_mime_header (gchar *uri,
                              guint *mime_header_length);

Get MIME header.

#### Parameters

uri | the URI |
mime_header_length | the return location of MIME header's length |

#### Returns

the byte array containing MIME header

Since: 3.0.0

### ags_osc_util_slip_encode ()

    guchar *
    ags_osc_util_slip_encode (guchar *osc_buffer,
                              guint buffer_length,
                              guint *returned_buffer_length);

Encode `osc_buffer` to be suitable for network transmission. See SLIP (RFC1055).

#### Parameters

osc_buffer | the OSC buffer |
buffer_length | the OSC buffer's length |
returned_buffer_length | the returned buffer's length |

#### Returns

the encoded byte array

Since: 3.0.0

### ags_osc_util_slip_decode ()

    guchar *
    ags_osc_util_slip_decode (guchar *slip_buffer,
                              guint slip_buffer_length,
                              guint *returned_buffer_length);

Decode `slip_buffer` from SLIP encoded format. See SLIP (RFC1055).

#### Parameters

slip_buffer | the SLIP encoded OSC buffer |
slip_buffer_length | the buffer length of SLIP encoded OSC buffer |
returned_buffer_length | the returned buffer's length |

#### Returns

the OSC buffer as byte array

Since: 3.0.0

### ags_osc_util_timetag_now ()

    void
    ags_osc_util_timetag_now (gint32 *tv_sec,
                              gint32 *tv_fraction);

Get current time.

#### Parameters

tv_sec | the return location of number of seconds since midnight on January 1, 1900 |
tv_fraction | the return location of fraction of seconds to a precision of about 200 picoseconds |

Since: 3.0.0

## Types and Values

### AGS_OSC_UTIL_TYPE_TAG_STRING_INT32

    #define AGS_OSC_UTIL_TYPE_TAG_STRING_INT32 'i'

### AGS_OSC_UTIL_TYPE_TAG_STRING_FLOAT

    #define AGS_OSC_UTIL_TYPE_TAG_STRING_FLOAT 'f'

### AGS_OSC_UTIL_TYPE_TAG_STRING_STRING

    #define AGS_OSC_UTIL_TYPE_TAG_STRING_STRING 's'

### AGS_OSC_UTIL_TYPE_TAG_STRING_BLOB

    #define AGS_OSC_UTIL_TYPE_TAG_STRING_BLOB 'b'

### AGS_OSC_UTIL_TYPE_TAG_STRING_INT64

    #define AGS_OSC_UTIL_TYPE_TAG_STRING_INT64 'h'

### AGS_OSC_UTIL_TYPE_TAG_STRING_TIMETAG

    #define AGS_OSC_UTIL_TYPE_TAG_STRING_TIMETAG 't'

### AGS_OSC_UTIL_TYPE_TAG_STRING_DOUBLE

    #define AGS_OSC_UTIL_TYPE_TAG_STRING_DOUBLE 'd'

### AGS_OSC_UTIL_TYPE_TAG_STRING_SYMBOL

    #define AGS_OSC_UTIL_TYPE_TAG_STRING_SYMBOL 'S'

### AGS_OSC_UTIL_TYPE_TAG_STRING_CHAR

    #define AGS_OSC_UTIL_TYPE_TAG_STRING_CHAR 'c'

### AGS_OSC_UTIL_TYPE_TAG_STRING_RGBA

    #define AGS_OSC_UTIL_TYPE_TAG_STRING_RGBA 'r'

### AGS_OSC_UTIL_TYPE_TAG_STRING_MIDI

    #define AGS_OSC_UTIL_TYPE_TAG_STRING_MIDI 'm'

### AGS_OSC_UTIL_TYPE_TAG_STRING_TRUE

    #define AGS_OSC_UTIL_TYPE_TAG_STRING_TRUE 'T'

### AGS_OSC_UTIL_TYPE_TAG_STRING_FALSE

    #define AGS_OSC_UTIL_TYPE_TAG_STRING_FALSE 'F'

### AGS_OSC_UTIL_TYPE_TAG_STRING_NIL

    #define AGS_OSC_UTIL_TYPE_TAG_STRING_NIL 'N'

### AGS_OSC_UTIL_TYPE_TAG_STRING_INFINITE

    #define AGS_OSC_UTIL_TYPE_TAG_STRING_INFINITE 'I'

### AGS_OSC_UTIL_TYPE_TAG_STRING_ARRAY_START

    #define AGS_OSC_UTIL_TYPE_TAG_STRING_ARRAY_START '['

### AGS_OSC_UTIL_TYPE_TAG_STRING_ARRAY_END

    #define AGS_OSC_UTIL_TYPE_TAG_STRING_ARRAY_END ']'

### AGS_OSC_UTIL_TYPE_TAG_STRING_ALL

    #define AGS_OSC_UTIL_TYPE_TAG_STRING_ALL "ifshtdScrmTFNI"

### AGS_OSC_UTIL_ADDRESS_PATTERN_VALID_CHARS_PATTERN

    #define AGS_OSC_UTIL_ADDRESS_PATTERN_VALID_CHARS_PATTERN "([a-zA-Z \\#\\*\\,\\/\\?\\[\\]\\{\\}]+)"

### AGS_OSC_UTIL_SLIP_CHUNK_LENGTH

    #define AGS_OSC_UTIL_SLIP_CHUNK_LENGTH (8192)

### AGS_OSC_UTIL_SLIP_END

    #define AGS_OSC_UTIL_SLIP_END (192)

### AGS_OSC_UTIL_SLIP_ESC

    #define AGS_OSC_UTIL_SLIP_ESC (219)

### AGS_OSC_UTIL_SLIP_ESC_END

    #define AGS_OSC_UTIL_SLIP_ESC_END (220)

### AGS_OSC_UTIL_SLIP_ESC_ESC

    #define AGS_OSC_UTIL_SLIP_ESC_ESC (221)