<!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: Channel Maps</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  <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><a href="index.html"><span>Main Page</span></a></li> <li class="current"><a href="pages.html"><span>Related Pages</span></a></li> <li><a href="annotated.html"><span>Data 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('channelmap.html','');}); </script> <div id="doc-content"> <div class="header"> <div class="headertitle"> <div class="title">Channel Maps </div> </div> </div><!--header--> <div class="contents"> <div class="textblock"><h1><a class="anchor" id="overv_sec"></a> Overview</h1> <p>Channel maps provide a way to associate channels in a stream with a specific speaker position. This relieves applications of having to make sure their channel order is identical to the final output.</p> <h1><a class="anchor" id="init_sec"></a> Initialisation</h1> <p>A channel map consists of an array of <a class="el" href="channelmap_8h.html#af1cbe2738487c74f99e613779bd34bf2">pa_channel_position</a> values, one for each channel. This array is stored together with a channel count in a <a class="el" href="structpa__channel__map.html" title="A channel map which can be used to attach labels to specific channels of a stream.">pa_channel_map</a> structure.</p> <p>Before filling the structure, the application must initialise it using <a class="el" href="channelmap_8h.html#abf6d26acfe2b0b7147034c19925a714f" title="Initialize the specified channel map and return a pointer to it.">pa_channel_map_init()</a>. There are also a number of convenience functions for standard channel mappings:</p> <ul> <li><a class="el" href="channelmap_8h.html#af32466c8cb879edf9439ec35866760c6" title="Initialize the specified channel map for monaural audio and return a pointer to it.">pa_channel_map_init_mono()</a> - Create a channel map with only mono audio. </li> <li><a class="el" href="channelmap_8h.html#a15e329f5ecc28cfb7ea26324a8035d02" title="Initialize the specified channel map for stereophonic audio and return a pointer to it...">pa_channel_map_init_stereo()</a> - Create a standard stereo mapping. </li> <li><a class="el" href="channelmap_8h.html#ab7d13111387d169484853f713b68f9cc" title="Initialize the specified channel map for the specified number of channels using default labels and re...">pa_channel_map_init_auto()</a> - Create a standard channel map for a specific number of channels </li> <li><a class="el" href="channelmap_8h.html#a219e8d74ecc3e4ce29c863af9bacaab8" title="Similar to pa_channel_map_init_auto() but instead of failing if no default mapping is known with the ...">pa_channel_map_init_extend()</a> - Similar to <a class="el" href="channelmap_8h.html#ab7d13111387d169484853f713b68f9cc" title="Initialize the specified channel map for the specified number of channels using default labels and re...">pa_channel_map_init_auto()</a> but synthesize a channel map if no predefined one is known for the specified number of channels.</li> </ul> <h1><a class="anchor" id="conv_sec"></a> Convenience Functions</h1> <p>The library contains a number of convenience functions for dealing with channel maps:</p> <ul> <li><a class="el" href="channelmap_8h.html#a5d4699c853806a999cbde869dbf7a7ad" title="Return non-zero if the specified channel map is considered valid.">pa_channel_map_valid()</a> - Tests if a channel map is valid. </li> <li><a class="el" href="channelmap_8h.html#a851c6c02f0cbfc193d9bacfe42110bd3" title="Compare two channel maps.">pa_channel_map_equal()</a> - Tests if two channel maps are identical. </li> <li><a class="el" href="channelmap_8h.html#a5baa37ac22ea08485b12fcce63a98abe" title="Make a human readable string from the specified channel map.">pa_channel_map_snprint()</a> - Creates a textual description of a channel map. </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>