Sophie

Sophie

distrib > Fedora > 14 > x86_64 > media > updates > by-pkgid > 2eb128636afdc4a8c8207ec3ec09861d > files > 65

fluidsynth-devel-1.1.3-1.fc14.i686.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>libfluidsynth: log.h File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.7.1 -->
<script type="text/javascript">
function hasClass(ele,cls) {
  return ele.className.match(new RegExp('(\\s|^)'+cls+'(\\s|$)'));
}

function addClass(ele,cls) {
  if (!this.hasClass(ele,cls)) ele.className += " "+cls;
}

function removeClass(ele,cls) {
  if (hasClass(ele,cls)) {
    var reg = new RegExp('(\\s|^)'+cls+'(\\s|$)');
    ele.className=ele.className.replace(reg,' ');
  }
}

function toggleVisibility(linkObj) {
 var base = linkObj.getAttribute('id');
 var summary = document.getElementById(base + '-summary');
 var content = document.getElementById(base + '-content');
 var trigger = document.getElementById(base + '-trigger');
 if ( hasClass(linkObj,'closed') ) {
   summary.style.display = 'none';
   content.style.display = 'block';
   trigger.src = 'open.png';
   removeClass(linkObj,'closed');
   addClass(linkObj,'opened');
 } else if ( hasClass(linkObj,'opened') ) {
   summary.style.display = 'block';
   content.style.display = 'none';
   trigger.src = 'closed.png';
   removeClass(linkObj,'opened');
   addClass(linkObj,'closed');
 }
 return false;
}
</script>
<div class="navigation" id="top">
  <div class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li><a href="examples.html"><span>Examples</span></a></li>
    </ul>
  </div>
  <div class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&nbsp;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#typedef-members">Typedefs</a> &#124;
<a href="#enum-members">Enumerations</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<h1>log.h File Reference</h1>  </div>
</div>
<div class="contents">

<p>Logging interface.  
<a href="#_details">More...</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">typedef void(*&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="log_8h.html#a94e275985c3b3a179967d8c7fb2f23cb">fluid_log_function_t</a> )(int level, char *message, void *data)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Log function handler callback type used by <a class="el" href="log_8h.html#a73045ac6812fb708625d1ea25e4e5224" title="Installs a new log function for a specified log level.">fluid_set_log_function()</a>.  <a href="#a94e275985c3b3a179967d8c7fb2f23cb"></a><br/></td></tr>
<tr><td colspan="2"><h2><a name="enum-members"></a>
Enumerations</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">enum &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="log_8h.html#aa341232c15addd9c336131984840ed9e">fluid_log_level</a> { <br/>
&nbsp;&nbsp;<a class="el" href="log_8h.html#aa341232c15addd9c336131984840ed9ea62d9ddd89d0a853606ce38d195daa99a">FLUID_PANIC</a>, 
<a class="el" href="log_8h.html#aa341232c15addd9c336131984840ed9eabc0ff48d192b3b0fc721946ccf095d25">FLUID_ERR</a>, 
<a class="el" href="log_8h.html#aa341232c15addd9c336131984840ed9ea394460be1ec74fce15e1ff683606df0f">FLUID_WARN</a>, 
<a class="el" href="log_8h.html#aa341232c15addd9c336131984840ed9eadfa902517702f2dd8ae849b810175ac4">FLUID_INFO</a>, 
<br/>
&nbsp;&nbsp;<a class="el" href="log_8h.html#aa341232c15addd9c336131984840ed9ea5542b67c606598020b832c31729175fc">FLUID_DBG</a>
<br/>
 }</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><p>FluidSynth log levels. </p>
 <a href="log_8h.html#aa341232c15addd9c336131984840ed9e">More...</a><br/></td></tr>
<tr><td colspan="2"><h2><a name="func-members"></a>
Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">FLUIDSYNTH_API <a class="el" href="log_8h.html#a94e275985c3b3a179967d8c7fb2f23cb">fluid_log_function_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="log_8h.html#a73045ac6812fb708625d1ea25e4e5224">fluid_set_log_function</a> (int level, <a class="el" href="log_8h.html#a94e275985c3b3a179967d8c7fb2f23cb">fluid_log_function_t</a> fun, void *data)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Installs a new log function for a specified log level.  <a href="#a73045ac6812fb708625d1ea25e4e5224"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">FLUIDSYNTH_API void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="log_8h.html#af9512c62588841dc6f797abc202c2541">fluid_default_log_function</a> (int level, char *message, void *data)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Default log function which prints to the stderr.  <a href="#af9512c62588841dc6f797abc202c2541"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">FLUIDSYNTH_API int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="log_8h.html#a4433d077ea131c3e4b542537d65ffd72">fluid_log</a> (int level, const char *fmt,...)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Print a message to the log.  <a href="#a4433d077ea131c3e4b542537d65ffd72"></a><br/></td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>Logging interface. </p>
<p>The default logging function of the fluidsynth prints its messages to the stderr. The synthesizer uses five level of messages: <a class="el" href="log_8h.html#aa341232c15addd9c336131984840ed9ea62d9ddd89d0a853606ce38d195daa99a" title="The synth can&#39;t function correctly any more.">FLUID_PANIC</a>, <a class="el" href="log_8h.html#aa341232c15addd9c336131984840ed9eabc0ff48d192b3b0fc721946ccf095d25" title="Serious error occurred.">FLUID_ERR</a>, <a class="el" href="log_8h.html#aa341232c15addd9c336131984840ed9ea394460be1ec74fce15e1ff683606df0f" title="Warning.">FLUID_WARN</a>, <a class="el" href="log_8h.html#aa341232c15addd9c336131984840ed9eadfa902517702f2dd8ae849b810175ac4" title="Verbose informational messages.">FLUID_INFO</a>, and <a class="el" href="log_8h.html#aa341232c15addd9c336131984840ed9ea5542b67c606598020b832c31729175fc" title="Debugging messages.">FLUID_DBG</a>.</p>
<p>A client application can install a new log function to handle the messages differently. In the following example, the application sets a callback function to display <a class="el" href="log_8h.html#aa341232c15addd9c336131984840ed9ea62d9ddd89d0a853606ce38d195daa99a" title="The synth can&#39;t function correctly any more.">FLUID_PANIC</a> messages in a dialog, and ignores all other messages by setting the log function to NULL:</p>
<div class="fragment"><pre class="fragment">   <a class="code" href="log_8h.html#a73045ac6812fb708625d1ea25e4e5224" title="Installs a new log function for a specified log level.">fluid_set_log_function</a>(<a class="code" href="log_8h.html#aa341232c15addd9c336131984840ed9ea62d9ddd89d0a853606ce38d195daa99a" title="The synth can&amp;#39;t function correctly any more.">FLUID_PANIC</a>, show_dialog, (<span class="keywordtype">void</span>*) root_window);
   <a class="code" href="log_8h.html#a73045ac6812fb708625d1ea25e4e5224" title="Installs a new log function for a specified log level.">fluid_set_log_function</a>(<a class="code" href="log_8h.html#aa341232c15addd9c336131984840ed9eabc0ff48d192b3b0fc721946ccf095d25" title="Serious error occurred.">FLUID_ERR</a>, NULL, NULL);
   <a class="code" href="log_8h.html#a73045ac6812fb708625d1ea25e4e5224" title="Installs a new log function for a specified log level.">fluid_set_log_function</a>(<a class="code" href="log_8h.html#aa341232c15addd9c336131984840ed9ea394460be1ec74fce15e1ff683606df0f" title="Warning.">FLUID_WARN</a>, NULL, NULL);
   <a class="code" href="log_8h.html#a73045ac6812fb708625d1ea25e4e5224" title="Installs a new log function for a specified log level.">fluid_set_log_function</a>(<a class="code" href="log_8h.html#aa341232c15addd9c336131984840ed9ea5542b67c606598020b832c31729175fc" title="Debugging messages.">FLUID_DBG</a>, NULL, NULL);
</pre></div> <hr/><h2>Typedef Documentation</h2>
<a class="anchor" id="a94e275985c3b3a179967d8c7fb2f23cb"></a><!-- doxytag: member="log.h::fluid_log_function_t" ref="a94e275985c3b3a179967d8c7fb2f23cb" args=")(int level, char *message, void *data)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef void(* <a class="el" href="log_8h.html#a94e275985c3b3a179967d8c7fb2f23cb">fluid_log_function_t</a>)(int level, char *message, void *data)</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Log function handler callback type used by <a class="el" href="log_8h.html#a73045ac6812fb708625d1ea25e4e5224" title="Installs a new log function for a specified log level.">fluid_set_log_function()</a>. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>level</em>&nbsp;</td><td>Log level (<a class="el" href="log_8h.html#aa341232c15addd9c336131984840ed9e" title="FluidSynth log levels.">fluid_log_level</a>) </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>message</em>&nbsp;</td><td>Log message text </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>data</em>&nbsp;</td><td>User data pointer supplied to <a class="el" href="log_8h.html#a73045ac6812fb708625d1ea25e4e5224" title="Installs a new log function for a specified log level.">fluid_set_log_function()</a>. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<hr/><h2>Enumeration Type Documentation</h2>
<a class="anchor" id="aa341232c15addd9c336131984840ed9e"></a><!-- doxytag: member="log.h::fluid_log_level" ref="aa341232c15addd9c336131984840ed9e" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="log_8h.html#aa341232c15addd9c336131984840ed9e">fluid_log_level</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>FluidSynth log levels. </p>
<dl><dt><b>Enumerator: </b></dt><dd><table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><em><a class="anchor" id="aa341232c15addd9c336131984840ed9ea62d9ddd89d0a853606ce38d195daa99a"></a><!-- doxytag: member="FLUID_PANIC" ref="aa341232c15addd9c336131984840ed9ea62d9ddd89d0a853606ce38d195daa99a" args="" -->FLUID_PANIC</em>&nbsp;</td><td>
<p>The synth can't function correctly any more. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="aa341232c15addd9c336131984840ed9eabc0ff48d192b3b0fc721946ccf095d25"></a><!-- doxytag: member="FLUID_ERR" ref="aa341232c15addd9c336131984840ed9eabc0ff48d192b3b0fc721946ccf095d25" args="" -->FLUID_ERR</em>&nbsp;</td><td>
<p>Serious error occurred. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="aa341232c15addd9c336131984840ed9ea394460be1ec74fce15e1ff683606df0f"></a><!-- doxytag: member="FLUID_WARN" ref="aa341232c15addd9c336131984840ed9ea394460be1ec74fce15e1ff683606df0f" args="" -->FLUID_WARN</em>&nbsp;</td><td>
<p>Warning. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="aa341232c15addd9c336131984840ed9eadfa902517702f2dd8ae849b810175ac4"></a><!-- doxytag: member="FLUID_INFO" ref="aa341232c15addd9c336131984840ed9eadfa902517702f2dd8ae849b810175ac4" args="" -->FLUID_INFO</em>&nbsp;</td><td>
<p>Verbose informational messages. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="aa341232c15addd9c336131984840ed9ea5542b67c606598020b832c31729175fc"></a><!-- doxytag: member="FLUID_DBG" ref="aa341232c15addd9c336131984840ed9ea5542b67c606598020b832c31729175fc" args="" -->FLUID_DBG</em>&nbsp;</td><td>
<p>Debugging messages. </p>
</td></tr>
</table>
</dd>
</dl>

</div>
</div>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="a73045ac6812fb708625d1ea25e4e5224"></a><!-- doxytag: member="log.h::fluid_set_log_function" ref="a73045ac6812fb708625d1ea25e4e5224" args="(int level, fluid_log_function_t fun, void *data)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">FLUIDSYNTH_API <a class="el" href="log_8h.html#a94e275985c3b3a179967d8c7fb2f23cb">fluid_log_function_t</a> fluid_set_log_function </td>
          <td>(</td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>level</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="log_8h.html#a94e275985c3b3a179967d8c7fb2f23cb">fluid_log_function_t</a>&nbsp;</td>
          <td class="paramname"> <em>fun</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&nbsp;</td>
          <td class="paramname"> <em>data</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Installs a new log function for a specified log level. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>level</em>&nbsp;</td><td>Log level to install handler for. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>fun</em>&nbsp;</td><td>Callback function handler to call for logged messages </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>data</em>&nbsp;</td><td>User supplied data pointer to pass to log function </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>The previously installed function. </dd></dl>

<p>References <a class="el" href="log_8h.html#a73045ac6812fb708625d1ea25e4e5224">fluid_set_log_function()</a>.</p>

<p>Referenced by <a class="el" href="log_8h.html#a73045ac6812fb708625d1ea25e4e5224">fluid_set_log_function()</a>.</p>

</div>
</div>
<a class="anchor" id="af9512c62588841dc6f797abc202c2541"></a><!-- doxytag: member="log.h::fluid_default_log_function" ref="af9512c62588841dc6f797abc202c2541" args="(int level, char *message, void *data)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">FLUIDSYNTH_API void fluid_default_log_function </td>
          <td>(</td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>level</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char *&nbsp;</td>
          <td class="paramname"> <em>message</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&nbsp;</td>
          <td class="paramname"> <em>data</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Default log function which prints to the stderr. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>level</em>&nbsp;</td><td>Log level </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>message</em>&nbsp;</td><td>Log message </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>data</em>&nbsp;</td><td>User supplied data (not used) </td></tr>
  </table>
  </dd>
</dl>

<p>References <a class="el" href="log_8h.html#aa341232c15addd9c336131984840ed9ea5542b67c606598020b832c31729175fc">FLUID_DBG</a>, <a class="el" href="log_8h.html#af9512c62588841dc6f797abc202c2541">fluid_default_log_function()</a>, <a class="el" href="log_8h.html#aa341232c15addd9c336131984840ed9eabc0ff48d192b3b0fc721946ccf095d25">FLUID_ERR</a>, <a class="el" href="log_8h.html#aa341232c15addd9c336131984840ed9eadfa902517702f2dd8ae849b810175ac4">FLUID_INFO</a>, <a class="el" href="log_8h.html#aa341232c15addd9c336131984840ed9ea62d9ddd89d0a853606ce38d195daa99a">FLUID_PANIC</a>, and <a class="el" href="log_8h.html#aa341232c15addd9c336131984840ed9ea394460be1ec74fce15e1ff683606df0f">FLUID_WARN</a>.</p>

<p>Referenced by <a class="el" href="log_8h.html#af9512c62588841dc6f797abc202c2541">fluid_default_log_function()</a>.</p>

</div>
</div>
<a class="anchor" id="a4433d077ea131c3e4b542537d65ffd72"></a><!-- doxytag: member="log.h::fluid_log" ref="a4433d077ea131c3e4b542537d65ffd72" args="(int level, const char *fmt,...)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">FLUIDSYNTH_API int fluid_log </td>
          <td>(</td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>level</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>fmt</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&nbsp;</td>
          <td class="paramname"> <em>...</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Print a message to the log. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>level</em>&nbsp;</td><td>Log level (<a class="el" href="log_8h.html#aa341232c15addd9c336131984840ed9e" title="FluidSynth log levels.">fluid_log_level</a>). </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>fmt</em>&nbsp;</td><td>Printf style format string for log message </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>...</em>&nbsp;</td><td>Arguments for printf 'fmt' message string </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>Always returns <a class="el" href="misc_8h.html#a90e8bdbc5a507bbfa5c45bac85a63a61" title="Value that indicates failure, used by most libfluidsynth functions.">FLUID_FAILED</a> </dd></dl>

<p>References <a class="el" href="log_8h.html#a4433d077ea131c3e4b542537d65ffd72">fluid_log()</a>.</p>

<p>Referenced by <a class="el" href="log_8h.html#a4433d077ea131c3e4b542537d65ffd72">fluid_log()</a>, <a class="el" href="seq_8h.html#a749882ab2b9ce51fa6a265db2cd59915">fluid_sequencer_register_client()</a>, <a class="el" href="seqbind_8h.html#a3680e34efa6745fcbe851fcd802cba39">fluid_sequencer_register_fluidsynth()</a>, <a class="el" href="seq_8h.html#aa62f856223ff035fcfca2517facc3205">fluid_sequencer_set_time_scale()</a>, <a class="el" href="event_8h.html#a1d535480f26630b755102415a6d246cb">new_fluid_event()</a>, and <a class="el" href="seq_8h.html#a3c27499606024a92bca0b32dbcf72c44">new_fluid_sequencer2()</a>.</p>

</div>
</div>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Tue Oct 12 2010 for libfluidsynth by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.1 </small></address>
</body>
</html>