<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> <title>Hooks in configuration files</title> <link href="doxygen.css" rel="stylesheet" type="text/css"> </head><body> <!-- Generated by Doxygen 1.2.18 --> <center> <a class="qindex" href="index.html">Main Page</a> <a class="qindex" href="modules.html">Modules</a> <a class="qindex" href="annotated.html">Data Structures</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="functions.html">Data Fields</a> <a class="qindex" href="globals.html">Globals</a> <a class="qindex" href="pages.html">Related Pages</a> <a class="qindex" href="examples.html">Examples</a> </center> <hr><h1><a name="confhooks">Hooks in configuration files</a> </h1> <p> <p> The hook extension in the ALSA library allows expansion of configuration nodes at run-time. The existence of a hook is determined by the presence of a @hooks compound node. <p> <p> This example defines a hook which loads two configuration files at the beginning: <p> <div class="fragment"><pre>@hooks [ { func load files [ <span class="stringliteral">"/etc/asound.conf"</span> <span class="stringliteral">"~/.asoundrc"</span> ] errors <span class="keyword">false</span> } ] </pre></div> <p> <h2><a name="confhooks_ref">Function reference</a> </h2> <p> <ul> <li>The function load - <code><a class="el" href="conf_8c.html#a56">snd_config_hook_load()</a></code> - loads and parses the given configuration files. <li>The function load_for_all_cards - <code><a class="el" href="conf_8c.html#a57">snd_config_hook_load_for_all_cards()</a></code> - loads and parses the given configuration files for each installed sound card. The driver name (the type of the sound card) is passed in the private configuration node. </ul> <hr><address style="align: right;"><small>Generated on Wed Apr 2 16:06:36 2003 for ALSA project - the C library reference by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border=0 width=110 height=53></a>1.2.18 </small></address> </body> </html>