Real Time Open Sound Control librtosc
|
Functions for retrieving default values from metadata (and runtime) More...
Go to the source code of this file.
Functions | |
const char * | rtosc::get_default_value (const char *port_name, const struct Ports &ports, void *runtime, const struct Port *port_hint=nullptr, int32_t idx=-1, int recursive=1) |
Return a port's default value. | |
int | rtosc::get_default_value (const char *port_name, const char *port_args, const struct Ports &ports, void *runtime, const struct Port *port_hint, int32_t idx, std::size_t n, rtosc_arg_val_t *res, char *strbuf, size_t strbufsize) |
Return a port's default value. | |
Functions for retrieving default values from metadata (and runtime)
int rtosc::get_default_value | ( | const char * | port_name, |
const char * | port_args, | ||
const struct Ports & | ports, | ||
void * | runtime, | ||
const struct Port * | port_hint, | ||
int32_t | idx, | ||
std::size_t | n, | ||
rtosc_arg_val_t * | res, | ||
char * | strbuf, | ||
size_t | strbufsize ) |
Return a port's default value.
Returns the default value of a given port, if any exists, as an array of rtosc_arg_vals . The values in the resulting array are being canonicalized, i.e. mapped values are being converted to integers; see canonicalize_arg_vals() .
port_name | the port's OSC path. |
port_args | the port's arguments, e.g. '::i:c:S' |
ports | the ports where portname is to be searched |
runtime | object holding ports . Optional. Helps finding default values dependent on others, such as presets. |
port_hint | The port itself corresponding to portname (including the args). If not specified, will be found using portname . |
idx | If the port is an array (using the '#' notation), this specifies the index required for the default value |
n | Size of the output parameter @res . This size can not be known, so you should provide a large enough array. |
res | The output parameter for the argument values. |
strbuf | String buffer for storing pretty printed strings and blobs. |
strbufsize | Size of strbuf |
res
(can be smaller than n
) or -1 if there is no valid default annotation const char * rtosc::get_default_value | ( | const char * | port_name, |
const struct Ports & | ports, | ||
void * | runtime, | ||
const struct Port * | port_hint = nullptr, | ||
int32_t | idx = -1, | ||
int | recursive = 1 ) |
Return a port's default value.
Returns the default value of a given port, if any exists, as a string. For the parameters, see the overloaded function.