Sophie

Sophie

distrib > Mageia > 6 > x86_64 > media > core-updates > by-pkgid > a41e5ac5fb332416cb8019ae392f1f99 > files > 193

lib64pulseaudio-devel-10.0-1.1.mga6.x86_64.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.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<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="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</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 id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">PulseAudio
   &#160;<span id="projectnumber">10.0.0-1.1.mga6</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',false,false,'search.php','Search');
});
</script>
<div id="main-nav"></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="logging_sec"></a>
Logging</h1>
<p>You can configure different logging parameters for the PulseAudio client libraries. The following environment variables are recognized:</p>
<ul>
<li><code>PULSE_LOG</code>: Maximum log level required. Bigger values result in a more verbose logging output. The following values are recognized:<ul>
<li><code>0</code>: Error messages</li>
<li><code>1</code>: Warning messages</li>
<li><code>2</code>: Notice messages</li>
<li><code>3</code>: Info messages</li>
<li><code>4</code>: Debug messages</li>
</ul>
</li>
<li><code>PULSE_LOG_SYSLOG</code>: If defined, force all client libraries to log their output using the syslog(3) mechanism. Default behavior is to log all output to stderr.</li>
<li><code>PULSE_LOG_JOURNAL</code>: If defined, force all client libraries to log their output using the systemd journal. If both <code>PULSE_LOG_JOURNAL</code> and <code>PULSE_LOG_SYSLOG</code> are defined, logging to the systemd journal takes a higher precedence. Each message originating library file name and function are included by default through the journal fields <code>CODE_FILE</code>, <code>CODE_FUNC</code>, and <code>CODE_LINE</code>. Any backtrace attached to the logging message is sent through the PulseAudio-specific journal field <code>PULSE_BACKTRACE</code>. This environment variable has no effect if PulseAudio was compiled without systemd journal support.</li>
<li><code>PULSE_LOG_COLORS</code>: If defined, enables colored logging output.</li>
<li><code>PULSE_LOG_TIME</code>: If defined, include timestamps with each message.</li>
<li><code>PULSE_LOG_FILE</code>: If defined, include each message originating file name.</li>
<li><code>PULSE_LOG_META</code>: If defined, include each message originating file name and path relative to the PulseAudio source tree root.</li>
<li><code>PULSE_LOG_LEVEL</code>: If defined, include a log level prefix with each message. Respectively, the prefixes "E", "W", "N", "I", "D" stands for Error, Warning, Notice, Info, and Debugging.</li>
<li><code>PULSE_LOG_BACKTRACE</code>: Number of functions to display in the backtrace. If this variable is not defined, or has a value of zero, no backtrace is shown.</li>
<li><code>PULSE_LOG_BACKTRACE_SKIP</code>: Number of backtrace levels to skip, from the function printing the log message downwards.</li>
<li><code>PULSE_LOG_NO_RATE_LIMIT</code>: If defined, do not rate limit the logging output. Rate limiting skips certain log messages when their frequency is considered too high.</li>
</ul>
<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.13 </li>
  </ul>
</div>
</body>
</html>