Data Structures | |
struct | snd_devname |
Defines | |
#define | SND_CONFIG_DLSYM_VERSION_EVALUATE _dlsym_config_evaluate_001 |
dlsym version for the config evaluate callback. | |
#define | SND_CONFIG_DLSYM_VERSION_HOOK _dlsym_config_hook_001 |
dlsym version for the config hook callback. | |
#define | snd_config_for_each(pos, next, node) for (pos = snd_config_iterator_first(node), next = snd_config_iterator_next(pos); pos != snd_config_iterator_end(node); pos = next, next = snd_config_iterator_next(pos)) |
Helper macro to iterate over the children of a compound node. | |
Typedefs | |
typedef enum _snd_config_type | snd_config_type_t |
Configuration node type. | |
typedef _snd_config | snd_config_t |
Internal structure for a configuration node object. | |
typedef _snd_config_iterator * | snd_config_iterator_t |
Type for a configuration compound iterator. | |
typedef _snd_config_update | snd_config_update_t |
Internal structure for a configuration private update object. | |
typedef snd_devname | snd_devname_t |
Enumerations | |
enum | _snd_config_type { SND_CONFIG_TYPE_INTEGER, SND_CONFIG_TYPE_INTEGER64, SND_CONFIG_TYPE_REAL, SND_CONFIG_TYPE_STRING, SND_CONFIG_TYPE_POINTER, SND_CONFIG_TYPE_COMPOUND = 1024 } |
Configuration node type. More... | |
Functions | |
int | snd_config_top (snd_config_t **config) |
Creates a top level configuration node. | |
int | snd_config_load (snd_config_t *config, snd_input_t *in) |
Loads a configuration tree. | |
int | snd_config_load_override (snd_config_t *config, snd_input_t *in) |
Loads a configuration tree and overrides existing configuration nodes. | |
int | snd_config_save (snd_config_t *config, snd_output_t *out) |
Dumps the contents of a configuration node or tree. | |
int | snd_config_update (void) |
Updates snd_config by rereading the global configuration files (if needed). | |
int | snd_config_update_r (snd_config_t **top, snd_config_update_t **update, const char *path) |
Updates a configuration tree by rereading the configuration files (if needed). | |
int | snd_config_update_free (snd_config_update_t *update) |
Frees a private update structure. | |
int | snd_config_update_free_global (void) |
Frees the global configuration tree in snd_config. | |
int | snd_config_search (snd_config_t *config, const char *key, snd_config_t **result) |
Searches for a node in a configuration tree. | |
int | snd_config_searchv (snd_config_t *config, snd_config_t **result,...) |
Searches for a node in a configuration tree. | |
int | snd_config_search_definition (snd_config_t *config, const char *base, const char *key, snd_config_t **result) |
Searches for a definition in a configuration tree, using aliases and expanding hooks and arguments. | |
int | snd_config_expand (snd_config_t *config, snd_config_t *root, const char *args, snd_config_t *private_data, snd_config_t **result) |
Expands a configuration node, applying arguments and functions. | |
int | snd_config_evaluate (snd_config_t *config, snd_config_t *root, snd_config_t *private_data, snd_config_t **result) |
Evaluates a configuration node at runtime. | |
int | snd_config_add (snd_config_t *config, snd_config_t *leaf) |
Adds a child to a compound configuration node. | |
int | snd_config_delete (snd_config_t *config) |
Frees a configuration node. | |
int | snd_config_delete_compound_members (const snd_config_t *config) |
Deletes the children of a node. | |
int | snd_config_copy (snd_config_t **dst, snd_config_t *src) |
Creates a copy of a configuration node. | |
int | snd_config_make (snd_config_t **config, const char *key, snd_config_type_t type) |
Creates a configuration node. | |
int | snd_config_make_integer (snd_config_t **config, const char *key) |
Creates an integer configuration node. | |
int | snd_config_make_integer64 (snd_config_t **config, const char *key) |
Creates a 64-bit-integer configuration node. | |
int | snd_config_make_real (snd_config_t **config, const char *key) |
Creates a real number configuration node. | |
int | snd_config_make_string (snd_config_t **config, const char *key) |
Creates a string configuration node. | |
int | snd_config_make_pointer (snd_config_t **config, const char *key) |
Creates a pointer configuration node. | |
int | snd_config_make_compound (snd_config_t **config, const char *key, int join) |
Creates an empty compound configuration node. | |
int | snd_config_imake_integer (snd_config_t **config, const char *key, const long value) |
Creates an integer configuration node with the given initial value. | |
int | snd_config_imake_integer64 (snd_config_t **config, const char *key, const long long value) |
Creates a 64-bit-integer configuration node with the given initial value. | |
int | snd_config_imake_real (snd_config_t **config, const char *key, const double value) |
Creates a real number configuration node with the given initial value. | |
int | snd_config_imake_string (snd_config_t **config, const char *key, const char *ascii) |
Creates a string configuration node with the given initial value. | |
int | snd_config_imake_pointer (snd_config_t **config, const char *key, const void *ptr) |
Creates a pointer configuration node with the given initial value. | |
snd_config_type_t | snd_config_get_type (const snd_config_t *config) |
Returns the type of a configuration node. | |
int | snd_config_set_id (snd_config_t *config, const char *id) |
Sets the id of a configuration node. | |
int | snd_config_set_integer (snd_config_t *config, long value) |
Changes the value of an integer configuration node. | |
int | snd_config_set_integer64 (snd_config_t *config, long long value) |
Changes the value of a 64-bit-integer configuration node. | |
int | snd_config_set_real (snd_config_t *config, double value) |
Changes the value of a real-number configuration node. | |
int | snd_config_set_string (snd_config_t *config, const char *value) |
Changes the value of a string configuration node. | |
int | snd_config_set_ascii (snd_config_t *config, const char *ascii) |
Changes the value of a configuration node. | |
int | snd_config_set_pointer (snd_config_t *config, const void *ptr) |
Changes the value of a pointer configuration node. | |
int | snd_config_get_id (const snd_config_t *config, const char **value) |
Returns the id of a configuration node. | |
int | snd_config_get_integer (const snd_config_t *config, long *value) |
Returns the value of an integer configuration node. | |
int | snd_config_get_integer64 (const snd_config_t *config, long long *value) |
Returns the value of a 64-bit-integer configuration node. | |
int | snd_config_get_real (const snd_config_t *config, double *value) |
Returns the value of a real-number configuration node. | |
int | snd_config_get_ireal (const snd_config_t *config, double *value) |
Returns the value of a real or integer configuration node. | |
int | snd_config_get_string (const snd_config_t *config, const char **value) |
Returns the value of a string configuration node. | |
int | snd_config_get_ascii (const snd_config_t *config, char **value) |
Returns the value of a configuration node as a string. | |
int | snd_config_get_pointer (const snd_config_t *config, const void **value) |
Returns the value of a pointer configuration node. | |
int | snd_config_test_id (const snd_config_t *config, const char *id) |
Compares the id of a configuration node to a given string. | |
snd_config_iterator_t | snd_config_iterator_first (const snd_config_t *node) |
Returns an iterator pointing to a node's first child. | |
snd_config_iterator_t | snd_config_iterator_next (const snd_config_iterator_t iterator) |
Returns an iterator pointing to the next sibling. | |
snd_config_iterator_t | snd_config_iterator_end (const snd_config_t *node) |
Returns an iterator that ends a node's children list. | |
snd_config_t * | snd_config_iterator_entry (const snd_config_iterator_t iterator) |
Returns the configuration node handle pointed to by an iterator. | |
int | snd_config_get_bool_ascii (const char *ascii) |
Gets the boolean value from the given ASCII string. | |
int | snd_config_get_bool (const snd_config_t *conf) |
Gets the boolean value from a configuration node. | |
int | snd_config_get_ctl_iface_ascii (const char *ascii) |
Gets the control interface index from the given ASCII string. | |
int | snd_config_get_ctl_iface (const snd_config_t *conf) |
Gets the control interface index from a configuration node. | |
int | snd_names_list (const char *iface, snd_devname_t **list) |
Give a list of device names and associated comments for selected interface. | |
void | snd_names_list_free (snd_devname_t *list) |
Release the list of device names. | |
Variables | |
snd_config_t * | snd_config |
Configuration top-level node (the global configuration). | |
snd_config_t * | snd_config = NULL |
Configuration top-level node (the global configuration). |
#define snd_config_for_each | ( | pos, | |||
next, | |||||
node | ) | for (pos = snd_config_iterator_first(node), next = snd_config_iterator_next(pos); pos != snd_config_iterator_end(node); pos = next, next = snd_config_iterator_next(pos)) |
Helper macro to iterate over the children of a compound node.
[in,out] | pos | Iterator variable for the current node. |
[in,out] | next | Temporary iterator variable for the next node. |
[in] | node | Handle to the compound configuration node to iterate over. |
for
statement, e.g.: snd_config_iterator_t pos, next; snd_config_for_each(pos, next, node) { snd_config_t *entry = snd_config_iterator_entry(pos); ... }
This macro allows deleting or removing the current node.
typedef struct _snd_config_iterator* snd_config_iterator_t |
Type for a configuration compound iterator.
The ALSA library uses this pointer type as a handle to a configuration compound iterator. Applications don't directly access the contents of the structure pointed to by this type.
typedef struct _snd_config snd_config_t |
Internal structure for a configuration node object.
The ALSA library uses a pointer to this structure as a handle to a configuration node. Applications don't access its contents directly.
typedef struct _snd_config_update snd_config_update_t |
Internal structure for a configuration private update object.
The ALSA library uses this structure to save private update information.
typedef struct snd_devname snd_devname_t |
Device-name list element
enum _snd_config_type |
Configuration node type.
int snd_config_add | ( | snd_config_t * | parent, | |
snd_config_t * | child | |||
) |
Adds a child to a compound configuration node.
parent | Handle to a compound configuration node. | |
child | Handle to the configuration node to be added. |
The parent node then owns the child node, i.e., the child node gets deleted together with its parent.
child must have an id.
int snd_config_copy | ( | snd_config_t ** | dst, | |
snd_config_t * | src | |||
) |
Creates a copy of a configuration node.
[out] | dst | The function puts the handle to the new configuration node at the address specified by dst. |
[in] | src | Handle to the source configuration node. |
int snd_config_delete | ( | snd_config_t * | config | ) |
Frees a configuration node.
config | Handle to the configuration node to be deleted. |
If the node is a child node, it is removed from the tree before being deleted.
If the node is a compound node, its descendants (the whole subtree) are deleted recursively.
int snd_config_delete_compound_members | ( | const snd_config_t * | config | ) |
Deletes the children of a node.
config | Handle to the compound configuration node. |
Any compound nodes among the children of config are deleted recursively.
After a successful call to this function, config is an empty compound node.
int snd_config_evaluate | ( | snd_config_t * | config, | |
snd_config_t * | root, | |||
snd_config_t * | private_data, | |||
snd_config_t ** | result | |||
) |
Evaluates a configuration node at runtime.
[in,out] | config | Handle to the source configuration node. |
[in] | root | Handle to the root of the source configuration. |
[in] | private_data | Handle to the private data node for runtime evaluation. |
result | Must be NULL . |
@func
) in config and replaces those nodes with the respective function results.
int snd_config_expand | ( | snd_config_t * | config, | |
snd_config_t * | root, | |||
const char * | args, | |||
snd_config_t * | private_data, | |||
snd_config_t ** | result | |||
) |
Expands a configuration node, applying arguments and functions.
[in] | config | Handle to the configuration node. |
[in] | root | Handle to the root configuration node. |
[in] | args | Arguments string, can be NULL . |
[in] | private_data | Handle to the private data node for functions. |
[out] | result | The function puts the handle to the result configuration node at the address specified by result. |
@args
), this function replaces any string node beginning with $ with the respective argument value, or the default argument value, or nothing. Furthermore, any functions are evaluated (see snd_config_evaluate). The resulting copy of config is returned in result.
int snd_config_get_ascii | ( | const snd_config_t * | config, | |
char ** | ascii | |||
) |
Returns the value of a configuration node as a string.
[in] | config | Handle to the configuration node. |
[out] | ascii | The function puts the pointer to the returned string at the address specified by ascii. |
free()
when it is no longer used.
For a string node with NULL
value, the returned string is NULL
.
Supported node types are SND_CONFIG_TYPE_INTEGER, SND_CONFIG_TYPE_INTEGER64, SND_CONFIG_TYPE_REAL, and SND_CONFIG_TYPE_STRING.
int snd_config_get_bool | ( | const snd_config_t * | conf | ) |
Gets the boolean value from a configuration node.
conf | Handle to the configuration node to be parsed. |
int snd_config_get_bool_ascii | ( | const char * | ascii | ) |
Gets the boolean value from the given ASCII string.
ascii | The string to be parsed. |
int snd_config_get_ctl_iface | ( | const snd_config_t * | conf | ) |
Gets the control interface index from a configuration node.
conf | Handle to the configuration node to be parsed. |
int snd_config_get_ctl_iface_ascii | ( | const char * | ascii | ) |
Gets the control interface index from the given ASCII string.
ascii | The string to be parsed. |
int snd_config_get_id | ( | const snd_config_t * | config, | |
const char ** | id | |||
) |
Returns the id of a configuration node.
[in] | config | Handle to the configuration node. |
[out] | id | The function puts the pointer to the id string at the address specified by id. |
If the node does not have an id, *id is set to NULL
.
int snd_config_get_integer | ( | const snd_config_t * | config, | |
long * | ptr | |||
) |
Returns the value of an integer configuration node.
[in] | config | Handle to the configuration node. |
[out] | ptr | The node's value. |
int snd_config_get_integer64 | ( | const snd_config_t * | config, | |
long long * | ptr | |||
) |
Returns the value of a 64-bit-integer configuration node.
[in] | config | Handle to the configuration node. |
[out] | ptr | The node's value. |
int snd_config_get_ireal | ( | const snd_config_t * | config, | |
double * | ptr | |||
) |
Returns the value of a real or integer configuration node.
[in] | config | Handle to the configuration node. |
[out] | ptr | The node's value. |
double
type on the fly.
int snd_config_get_pointer | ( | const snd_config_t * | config, | |
const void ** | ptr | |||
) |
Returns the value of a pointer configuration node.
[in] | config | Handle to the configuration node. |
[out] | ptr | The function puts the node's value at the address specified by ptr. |
int snd_config_get_real | ( | const snd_config_t * | config, | |
double * | ptr | |||
) |
Returns the value of a real-number configuration node.
[in] | config | Handle to the configuration node. |
[out] | ptr | The node's value. |
int snd_config_get_string | ( | const snd_config_t * | config, | |
const char ** | ptr | |||
) |
Returns the value of a string configuration node.
[in] | config | Handle to the configuration node. |
[out] | ptr | The function puts the node's value at the address specified by ptr. |
The string may be NULL
.
snd_config_type_t snd_config_get_type | ( | const snd_config_t * | config | ) |
Returns the type of a configuration node.
config | Handle to the configuration node. |
int snd_config_imake_integer | ( | snd_config_t ** | config, | |
const char * | id, | |||
const long | value | |||
) |
Creates an integer configuration node with the given initial value.
[out] | config | The function puts the handle to the new node at the address specified by config. |
[in] | id | The id of the new node. |
[in] | value | The initial value of the new node. |
int snd_config_imake_integer64 | ( | snd_config_t ** | config, | |
const char * | id, | |||
const long long | value | |||
) |
Creates a 64-bit-integer configuration node with the given initial value.
[out] | config | The function puts the handle to the new node at the address specified by config. |
[in] | id | The id of the new node. |
[in] | value | The initial value of the new node. |
int snd_config_imake_pointer | ( | snd_config_t ** | config, | |
const char * | id, | |||
const void * | value | |||
) |
Creates a pointer configuration node with the given initial value.
[out] | config | The function puts the handle to the new node at the address specified by config. |
[in] | id | The id of the new node. |
[in] | value | The initial value of the new node. |
value
.
int snd_config_imake_real | ( | snd_config_t ** | config, | |
const char * | id, | |||
const double | value | |||
) |
Creates a real number configuration node with the given initial value.
[out] | config | The function puts the handle to the new node at the address specified by config. |
[in] | id | The id of the new node. |
[in] | value | The initial value of the new node. |
int snd_config_imake_string | ( | snd_config_t ** | config, | |
const char * | id, | |||
const char * | value | |||
) |
Creates a string configuration node with the given initial value.
[out] | config | The function puts the handle to the new node at the address specified by config. |
[in] | id | The id of the new node. |
[in] | value | The initial value of the new node. May be NULL . |
value
.
snd_config_iterator_t snd_config_iterator_end | ( | const snd_config_t * | config | ) |
Returns an iterator that ends a node's children list.
[in] | config | Handle to a configuration node. |
The return value can be understood as pointing past the last child of config.
snd_config_t* snd_config_iterator_entry | ( | const snd_config_iterator_t | iterator | ) |
Returns the configuration node handle pointed to by an iterator.
[in] | iterator | A configuration node iterator. |
snd_config_iterator_t snd_config_iterator_first | ( | const snd_config_t * | config | ) |
Returns an iterator pointing to a node's first child.
[in] | config | Handle to a configuration node. |
The returned iterator is valid if it is not equal to the return value of snd_config_iterator_end on config.
Use snd_config_iterator_entry to get the handle of the node pointed to.
snd_config_iterator_t snd_config_iterator_next | ( | const snd_config_iterator_t | iterator | ) |
Returns an iterator pointing to the next sibling.
[in] | iterator | An iterator pointing to a child configuration node. |
Use snd_config_iterator_entry to get the handle of the node pointed to.
int snd_config_load | ( | snd_config_t * | config, | |
snd_input_t * | in | |||
) |
Loads a configuration tree.
config | Handle to a top level configuration node. | |
in | Input handle to read the configuration from. |
int snd_config_load_override | ( | snd_config_t * | config, | |
snd_input_t * | in | |||
) |
Loads a configuration tree and overrides existing configuration nodes.
config | Handle to a top level configuration node. | |
in | Input handle to read the configuration from. |
int snd_config_make | ( | snd_config_t ** | config, | |
const char * | id, | |||
snd_config_type_t | type | |||
) |
Creates a configuration node.
[out] | config | The function puts the handle to the new node at the address specified by config. |
[in] | id | The id of the new node. |
[in] | type | The type of the new node. |
NULL
.
The value of the new node is zero (for numbers), or NULL
(for strings and pointers), or empty (for compound nodes).
int snd_config_make_compound | ( | snd_config_t ** | config, | |
const char * | id, | |||
int | join | |||
) |
Creates an empty compound configuration node.
[out] | config | The function puts the handle to the new node at the address specified by config. |
[in] | id | The id of the new node. |
[in] | join | Join flag. |
join determines how the compound node's id is printed when the configuration is saved to a text file. For example, if the join flag of compound node a
is zero, the output will look as follows:
a {
b "hello"
c 42
}
a
is nonzero, its id will be joined with its children's ids, like this: a.b "hello"
a.c 42
int snd_config_make_integer | ( | snd_config_t ** | config, | |
const char * | id | |||
) |
Creates an integer configuration node.
[out] | config | The function puts the handle to the new node at the address specified by config. |
[in] | id | The id of the new node. |
0
.
int snd_config_make_integer64 | ( | snd_config_t ** | config, | |
const char * | id | |||
) |
Creates a 64-bit-integer configuration node.
[out] | config | The function puts the handle to the new node at the address specified by config. |
[in] | id | The id of the new node. |
0
.
int snd_config_make_pointer | ( | snd_config_t ** | config, | |
const char * | id | |||
) |
Creates a pointer configuration node.
[out] | config | The function puts the handle to the new node at the address specified by config. |
[in] | id | The id of the new node. |
NULL
.
int snd_config_make_real | ( | snd_config_t ** | config, | |
const char * | id | |||
) |
Creates a real number configuration node.
[out] | config | The function puts the handle to the new node at the address specified by config. |
[in] | id | The id of the new node. |
0.0
.
int snd_config_make_string | ( | snd_config_t ** | config, | |
const char * | id | |||
) |
Creates a string configuration node.
[out] | config | The function puts the handle to the new node at the address specified by config. |
[in] | id | The id of the new node. |
NULL
.
int snd_config_save | ( | snd_config_t * | config, | |
snd_output_t * | out | |||
) |
Dumps the contents of a configuration node or tree.
config | Handle to the (root) configuration node. | |
out | Output handle. |
int snd_config_search | ( | snd_config_t * | config, | |
const char * | key, | |||
snd_config_t ** | result | |||
) |
Searches for a node in a configuration tree.
[in] | config | Handle to the root of the configuration (sub)tree to search. |
[in] | key | Search key: one or more node ids, separated with dots. |
[out] | result | When result != NULL , the function puts the handle to the node found at the address specified by result. |
In the following example, the comment after each node shows the search key to find that node, assuming that config is a handle to the compound node with id config:
config { a 42 # "a" b { # "b" c "cee" # "b.c" d { # "b.d" e 2.71828 # "b.d.e" } } }
int snd_config_search_definition | ( | snd_config_t * | config, | |
const char * | base, | |||
const char * | name, | |||
snd_config_t ** | result | |||
) |
Searches for a definition in a configuration tree, using aliases and expanding hooks and arguments.
[in] | config | Handle to the configuration (sub)tree to search. |
[in] | base | Implicit key base, or NULL for none. |
[in] | name | Key suffix, optionally with arguments. |
[out] | result | The function puts the handle to the expanded found node at the address specified by result. |
If name contains a colon (:), the rest of the string after the colon contains arguments that are expanded as with snd_config_expand.
In any case, result is a new node that must be freed by the caller.
int snd_config_searchv | ( | snd_config_t * | config, | |
snd_config_t ** | result, | |||
... | ||||
) |
Searches for a node in a configuration tree.
[in] | config | Handle to the root of the configuration (sub)tree to search. |
[out] | result | When result != NULL , the function puts the handle to the node found at the address specified by result. |
[in] | ... | One or more concatenated dot-separated search keys, terminated with NULL . |
snd_config_searchv(cfg, &res, "a", "b.c", "d.e", NULL);
snd_config_search(cfg, "a.b.c.d.e", &res);
int snd_config_set_ascii | ( | snd_config_t * | config, | |
const char * | ascii | |||
) |
Changes the value of a configuration node.
config | Handle to the configuration node. | |
ascii | The new value for the node, as an ASCII string. |
NULL
, not even for a string node.The node's type does not change, i.e., the string must contain a valid value with the same type as the node's type. For a string node, the node's new value is a copy of ascii.
int snd_config_set_id | ( | snd_config_t * | config, | |
const char * | id | |||
) |
Sets the id of a configuration node.
config | Handle to the configuration node. | |
id | The new node id, must not be NULL . |
NULL
. int snd_config_set_integer | ( | snd_config_t * | config, | |
long | value | |||
) |
Changes the value of an integer configuration node.
config | Handle to the configuration node. | |
value | The new value for the node. |
int snd_config_set_integer64 | ( | snd_config_t * | config, | |
long long | value | |||
) |
Changes the value of a 64-bit-integer configuration node.
config | Handle to the configuration node. | |
value | The new value for the node. |
int snd_config_set_pointer | ( | snd_config_t * | config, | |
const void * | value | |||
) |
Changes the value of a pointer configuration node.
config | Handle to the configuration node. | |
value | The new value for the node. May be NULL . |
int snd_config_set_real | ( | snd_config_t * | config, | |
double | value | |||
) |
Changes the value of a real-number configuration node.
config | Handle to the configuration node. | |
value | The new value for the node. |
int snd_config_set_string | ( | snd_config_t * | config, | |
const char * | value | |||
) |
Changes the value of a string configuration node.
config | Handle to the configuration node. | |
value | The new value for the node. May be NULL . |
int snd_config_test_id | ( | const snd_config_t * | config, | |
const char * | id | |||
) |
Compares the id of a configuration node to a given string.
config | Handle to the configuration node. | |
id | ASCII id. |
strcmp
function, i.e., less than zero if config's id is lexicographically less than id, zero if config's id is equal to id, greater than zero otherwise. int snd_config_top | ( | snd_config_t ** | config | ) |
Creates a top level configuration node.
[out] | config | Handle to the new node. |
int snd_config_update | ( | void | ) |
Updates snd_config by rereading the global configuration files (if needed).
int snd_config_update_free | ( | snd_config_update_t * | update | ) |
Frees a private update structure.
[in] | update | The private update structure to free. |
int snd_config_update_free_global | ( | void | ) |
Frees the global configuration tree in snd_config.
NULL
.
int snd_config_update_r | ( | snd_config_t ** | _top, | |
snd_config_update_t ** | _update, | |||
const char * | cfgs | |||
) |
Updates a configuration tree by rereading the configuration files (if needed).
[in,out] | _top | Address of the handle to the top-level node. |
[in,out] | _update | Address of a pointer to private update information. |
[in] | cfgs | A list of configuration file names, delimited with ':'. If cfgs is NULL , the default global configuration file is used. |
NULL
before the first call to this function. The private update information holds information about all used configuration files that allows this function to detects changes to them; this data can be freed with snd_config_update_free.
The global configuration files are specified in the environment variable ALSA_CONFIG_PATH
.
int snd_names_list | ( | const char * | iface, | |
snd_devname_t ** | list | |||
) |
Give a list of device names and associated comments for selected interface.
iface | a string identifying interface ("pcm", "ctl", "seq", "rawmidi") | |
list | result - a pointer to list |
ALSA_NAMES_FILE
.
void snd_names_list_free | ( | snd_devname_t * | list | ) |
Release the list of device names.
list | the name list to release |
snd_config_t* snd_config = NULL |
Configuration top-level node (the global configuration).
This variable contains a handle to the top-level configuration node, as loaded from global configuration file.
This variable is initialized or updated by snd_config_update. Functions like snd_pcm_open (that use a device name from the global configuration) automatically call snd_config_update. Before the first call to snd_config_update, this variable is NULL
.
The global configuration files are specified in the environment variable ALSA_CONFIG_PATH
. If this is not set, the default value is "/usr/share/alsa/alsa.conf".
Configuration top-level node (the global configuration).
This variable contains a handle to the top-level configuration node, as loaded from global configuration file.
This variable is initialized or updated by snd_config_update. Functions like snd_pcm_open (that use a device name from the global configuration) automatically call snd_config_update. Before the first call to snd_config_update, this variable is NULL
.
The global configuration files are specified in the environment variable ALSA_CONFIG_PATH
. If this is not set, the default value is "/usr/share/alsa/alsa.conf".