Sophie

Sophie

distrib > Fedora > 18 > x86_64 > media > updates > by-pkgid > c6a4530fb2a89779c232c42c21f3bfa2 > files > 170

pulseaudio-libs-devel-2.1-7.fc18.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"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.3"/>
<title>PulseAudio: Main Page</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">PulseAudio
   &#160;<span id="projectnumber">2.1</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.3 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li class="current"><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li><a href="examples.html"><span>Examples</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('index.html','');});
</script>
<div id="doc-content">
<div class="header">
  <div class="headertitle">
<div class="title">PulseAudio Documentation</div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><h1><a class="anchor" id="intro_sec"></a>
Introduction</h1>
<p>This document describes the client API for the PulseAudio sound server. The API comes in two flavours to accommodate different styles of applications and different needs in complexity:</p>
<ul>
<li>The complete but somewhat complicated to use asynchronous API </li>
<li>The simplified, easy to use, but limited synchronous API</li>
</ul>
<p>All strings in PulseAudio are in the UTF-8 encoding, regardless of current locale. Some functions will filter invalid sequences from the string, some will simply fail. To ensure reliable behaviour, make sure everything you pass to the API is already in UTF-8.</p>
<h1><a class="anchor" id="simple_sec"></a>
Simple API</h1>
<p>Use this if you develop your program in synchronous style and just need a way to play or record data on the sound server. See <a class="el" href="simple.html">Simple API</a> for more details.</p>
<h1><a class="anchor" id="async_sec"></a>
Asynchronous API</h1>
<p>Use this if you develop your programs in asynchronous, event loop based style or if you want to use the advanced features of the PulseAudio API. A guide can be found in<a class="el" href="async.html">Asynchronous API</a>.</p>
<p>By using the built-in threaded main loop, it is possible to achieve a pseudo-synchronous API, which can be useful in synchronous applications where the simple API is insufficient. See the <a class="el" href="async.html">Asynchronous API</a> page for details.</p>
<h1><a class="anchor" id="thread_sec"></a>
Threads</h1>
<p>The PulseAudio client libraries are not designed to be directly thread-safe. They are however designed to be reentrant and threads-aware.</p>
<p>To use the libraries in a threaded environment, you must assure that all objects are only used in one thread at a time. Normally, this means that all objects belonging to a single context must be accessed from the same thread.</p>
<p>The included main loop implementation is also not thread safe. Take care to make sure event objects are not manipulated when any other code is using the main loop.</p>
<h1><a class="anchor" id="error_sec"></a>
Error Handling</h1>
<p>Every function should explicitly document how errors are reported to the caller. Unfortunately, currently a lot of that documentation is missing. Here is an overview of the general conventions used.</p>
<p>The PulseAudio API indicates error conditions by returning a negative integer value or a NULL pointer. On success, zero or a positive integer value or a valid pointer is returned.</p>
<p>Functions of the <a class="el" href="simple.html">Simple API</a> generally return -1 or NULL on failure and can optionally store an error code (see <a class="el" href="def_8h.html#a73eb0e01743b361a0b21e767655f23b2" title="Error values as used by pa_context_errno().">pa_error_code</a>) using a pointer argument.</p>
<p>Functions of the <a class="el" href="async.html">Asynchronous API</a> return an negative error code or NULL on failure (see <a class="el" href="def_8h.html#a73eb0e01743b361a0b21e767655f23b2" title="Error values as used by pa_context_errno().">pa_error_code</a>). In the later case, <a class="el" href="context_8h.html#aa8262c715ef8c48bcd2fbc5ae57a6df9" title="Return the error number of the last failed operation.">pa_context_errno()</a> can be used to obtain the error code of the last failed operation.</p>
<p>An error code can be turned into a human readable message using <a class="el" href="error_8h.html#a593deb681fba75fad4b3a2d65d0ac2b2" title="Return a human readable error message for the specified numeric error code.">pa_strerror()</a>.</p>
<h1><a class="anchor" id="pkgconfig"></a>
pkg-config</h1>
<p>The PulseAudio libraries provide pkg-config snippets for the different modules:</p>
<ul>
<li>libpulse - The asynchronous API and the internal main loop implementation. </li>
<li>libpulse-mainloop-glib - GLIB 2.x main loop bindings. </li>
<li>libpulse-simple - The simple PulseAudio API. </li>
</ul>
</div></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.3 </li>
  </ul>
</div>
</body>
</html>