Sophie

Sophie

distrib > Mandriva > 9.1 > ppc > media > updates > by-pkgid > 18785641029f14f23cccc82925607ace > files > 150

libalsa2-docs-0.9.0-0.14rc7.1mdk.ppc.rpm

<!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>Timer interface</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> &nbsp; <a class="qindex" href="modules.html">Modules</a> &nbsp; <a class="qindex" href="annotated.html">Data Structures</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="functions.html">Data Fields</a> &nbsp; <a class="qindex" href="globals.html">Globals</a> &nbsp; <a class="qindex" href="pages.html">Related Pages</a> &nbsp; <a class="qindex" href="examples.html">Examples</a> &nbsp; </center>
<hr><h1><a name="timer">Timer interface</a>
</h1>
<p>

<p>
 Timer interface is designed to use internal timers in sound hardware, but it can be driven with any timer.
<p>
<h2><a name="timer_general_overview">General overview</a>
</h2>
<p>
The timer implementation uses ring buffer to store information about timing events. In this buffer is recorded count of ticks and current tick resolution in nanoseconds.
<p>
<h2><a name="timer_open">Opening</a>
</h2>
<p>
Timer devices can be opened in two ways. When <a class="el" href="group___timer.html#a73">SND_TIMER_OPEN_NONBLOCK</a> flag is used, then the open functions return immediately with -EBUSY error code when resources are occupied with another application. When <a class="el" href="group___timer.html#a73">SND_TIMER_OPEN_NONBLOCK</a> is not used (by default) the open functions block the application requesting device until resources are not free.
<p>
<h2><a name="timer_events">Events</a>
</h2>
<p>
Events are read via <a class="el" href="group___timer.html#a26">snd_timer_read()</a> function.
<p>
<h2><a name="timer_examples">Examples</a>
</h2>
<p>
The full featured examples with cross-links:<dl compact><dt><b>Simple timer test program</b></dt><dd>
<a class="el" href="_2test_2timer_8c-example.html#example_test_timer">example code</a> 
<p>
This example shows opening a timer device and reading of timer events.</dl><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>