2
* Copyright (c) 2004 by Hannu Savolainen < hannu@opensound.com>
4
* This library is free software; you can redistribute it and/or modify
5
* it under the terms of the GNU Lesser General Public License version 2.1 as
6
* published by the Free Software Foundation.
8
* This program is distributed in the hope that it will be useful,
9
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
* GNU Lesser General Public License for more details.
13
* You should have received a copy of the GNU Lesser General Public
14
* License along with this library; if not, write to the Free Software
15
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21
snd_config_t *snd_config = NULL;
24
snd_strerror (int errnum)
29
return strerror (errnum);;
33
* \brief Dumps the contents of a configuration node or tree.
34
* \param config Handle to the (root) configuration node.
35
* \param out Output handle.
36
* \return Zero if successful, otherwise a negative error code.
39
snd_config_save (snd_config_t * config, snd_output_t * out)
41
dbg_printf ("snd_config_save()\n");
47
* \brief Searches for a node in a configuration tree.
48
* \param config Handle to the root of the configuration (sub)tree to search.
49
* \param key Search key: one or more node keys, separated with dots.
50
* \param result The function puts the handle to the node found at the address
51
* specified by \p result.
52
* \return Zero if successful, otherwise a negative error code.
55
snd_config_search (snd_config_t * config, const char *key,
56
snd_config_t ** result)
58
dbg_printf ("snd_config_search()\n");
64
* \brief Updates #snd_config by rereading the global configuration files (if needed).
65
* \return A non-negative value if successful, otherwise a negative error code. * \retval 0 No action is needed.
66
* \retval 1 The configuration tree has been rebuilt.
68
* The global configuration files are specified in the environment variable
69
* \c ALSA_CONFIG_PATH. If this is not set, the default value is
70
* "/usr/share/alsa/alsa.conf".
72
* \warning If the configuration tree is reread, all string pointers and
73
* configuration node handles previously obtained from this tree become invalid.
76
snd_config_update (void)
78
dbg_printf ("snd_config_update()\n");
84
* \brief Frees the global configuration tree in #snd_config.
85
* \return Zero if successful, otherwise a negative error code.
88
snd_config_update_free_global (void)
90
dbg_printf ("snd_config_update_free_global()\n");
96
* \brief Sets the error handler.
97
* \param handler The pointer to the new error handler function.
99
* This function sets a new error handler, or (if \c handler is \c NULL)
100
* the default one which prints the error messages to \c stderr.
103
snd_lib_error_set_handler (snd_lib_error_handler_t handler)
105
dbg_printf ("snd_lib_error_set_handler()\n");