Sophie

Sophie

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

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: Sample Format Specifications</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('sample.html','');});
</script>
<div id="doc-content">
<div class="header">
  <div class="headertitle">
<div class="title">Sample Format Specifications </div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><h1><a class="anchor" id="overv_sec"></a>
Overview</h1>
<p>PulseAudio is capable of handling a multitude of sample formats, rates and channels, transparently converting and mixing them as needed.</p>
<h1><a class="anchor" id="format_sec"></a>
Sample Format</h1>
<p>PulseAudio supports the following sample formats:</p>
<ul>
<li>PA_SAMPLE_U8 - Unsigned 8 bit integer PCM. </li>
<li>PA_SAMPLE_S16LE - Signed 16 integer bit PCM, little endian. </li>
<li>PA_SAMPLE_S16BE - Signed 16 integer bit PCM, big endian. </li>
<li>PA_SAMPLE_FLOAT32LE - 32 bit IEEE floating point PCM, little endian. </li>
<li>PA_SAMPLE_FLOAT32BE - 32 bit IEEE floating point PCM, big endian. </li>
<li>PA_SAMPLE_ALAW - 8 bit a-Law. </li>
<li>PA_SAMPLE_ULAW - 8 bit mu-Law. </li>
<li>PA_SAMPLE_S32LE - Signed 32 bit integer PCM, little endian. </li>
<li>PA_SAMPLE_S32BE - Signed 32 bit integer PCM, big endian. </li>
<li>PA_SAMPLE_S24LE - Signed 24 bit integer PCM packed, little endian. </li>
<li>PA_SAMPLE_S24BE - Signed 24 bit integer PCM packed, big endian. </li>
<li>PA_SAMPLE_S24_32LE - Signed 24 bit integer PCM in LSB of 32 bit words, little endian. </li>
<li>PA_SAMPLE_S24_32BE - Signed 24 bit integer PCM in LSB of 32 bit words, big endian.</li>
</ul>
<p>The floating point sample formats have the range from -1.0 to 1.0.</p>
<p>The sample formats that are sensitive to endianness have convenience macros for native endian (NE), and reverse endian (RE).</p>
<h1><a class="anchor" id="rate_sec"></a>
Sample Rates</h1>
<p>PulseAudio supports any sample rate between 1 Hz and 192000 Hz. There is no point trying to exceed the sample rate of the output device though as the signal will only get downsampled, consuming CPU on the machine running the server.</p>
<h1><a class="anchor" id="chan_sec"></a>
Channels</h1>
<p>PulseAudio supports up to 32 individual channels. The order of the channels is up to the application, but they must be continuous. To map channels to speakers, see <a class="el" href="channelmap.html">Channel Maps</a>.</p>
<h1><a class="anchor" id="calc_sec"></a>
Calculations</h1>
<p>The PulseAudio library contains a number of convenience functions to do calculations on sample formats:</p>
<ul>
<li><a class="el" href="sample_8h.html#a674c3449416e97b71a75feb64ca59ad4" title="Return the amount of bytes playback of a second of audio with the specified sample type takes...">pa_bytes_per_second()</a> - The number of bytes one second of audio will take given a sample format. </li>
<li><a class="el" href="sample_8h.html#a035d79171e183f6315e6e65436f5e939" title="Return the size of a frame with the specific sample type. ">pa_frame_size()</a> - The size, in bytes, of one frame (i.e. one set of samples, one for each channel). </li>
<li><a class="el" href="sample_8h.html#aae286d84c2975248f65f804d4c24ef39" title="Return the size of a sample with the specific sample type. ">pa_sample_size()</a> - The size, in bytes, of one sample. </li>
<li><a class="el" href="sample_8h.html#ab3c5f4af357686fdc7df46c9581154bd" title="Calculate the time the specified bytes take to play with the specified sample type. ">pa_bytes_to_usec()</a> - Calculate the time it would take to play a buffer of a certain size.</li>
</ul>
<h1><a class="anchor" id="util_sec"></a>
Convenience Functions</h1>
<p>The library also contains a couple of other convenience functions:</p>
<ul>
<li><a class="el" href="sample_8h.html#a0d9ad972ee71ef6bff8aaafd44fdb229" title="Return non-zero when the sample type specification is valid. ">pa_sample_spec_valid()</a> - Tests if a sample format specification is valid. </li>
<li><a class="el" href="sample_8h.html#ac4c2262bf88bd90fc68767e69fb6810c" title="Return non-zero when the two sample type specifications match. ">pa_sample_spec_equal()</a> - Tests if the sample format specifications are identical. </li>
<li><a class="el" href="sample_8h.html#a70804b50d5507f9a7680d4e809e337ed" title="Return a descriptive string for the specified sample format. ">pa_sample_format_to_string()</a> - Return a textual description of a sample format. </li>
<li><a class="el" href="sample_8h.html#a2819db448dd45edb5d777b7568dd3236" title="Parse a sample format text. ">pa_parse_sample_format()</a> - Parse a text string into a sample format. </li>
<li><a class="el" href="sample_8h.html#a3dd4815bbd51d5467b40e28d05ad948d" title="Pretty print a sample type specification to a string. ">pa_sample_spec_snprint()</a> - Create a textual description of a complete sample format specification. </li>
<li><a class="el" href="sample_8h.html#a4992ec70d79de601c6f8f6cc5cab8e59" title="Pretty print a byte size value (i.e. &quot;2.5 MiB&quot;) ">pa_bytes_snprint()</a> - Pretty print a byte value (e.g. 2.5 MiB). </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>