<!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>Helper Functions</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> <a class="qindex" href="modules.html">Modules</a> <a class="qindex" href="annotated.html">Data Structures</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="functions.html">Data Fields</a> <a class="qindex" href="globals.html">Globals</a> <a class="qindex" href="pages.html">Related Pages</a> <a class="qindex" href="examples.html">Examples</a> </center> <hr><h1>Helper Functions<br> <small> [<a class="el" href="group___p_c_m.html">PCM Interface</a>]</small> </h1><table border=0 cellpadding=0 cellspacing=0> <tr><td></td></tr> <tr><td colspan=2><br><h2>Functions</h2></td></tr> <tr><td nowrap align=right valign=top>int </td><td valign=bottom><a class="el" href="group___p_c_m___helpers.html#a0">snd_pcm_format_signed</a> (<a class="el" href="group___p_c_m.html#a11">snd_pcm_format_t</a> format)</td></tr> <tr><td> </td><td><font size=-1><em>Return sign info for a PCM sample linear format.</em> <a href="#a0"></a><em></em></font><br><br></td></tr> <tr><td nowrap align=right valign=top>int </td><td valign=bottom><a class="el" href="group___p_c_m___helpers.html#a1">snd_pcm_format_unsigned</a> (<a class="el" href="group___p_c_m.html#a11">snd_pcm_format_t</a> format)</td></tr> <tr><td> </td><td><font size=-1><em>Return sign info for a PCM sample linear format.</em> <a href="#a1"></a><em></em></font><br><br></td></tr> <tr><td nowrap align=right valign=top>int </td><td valign=bottom><a class="el" href="group___p_c_m___helpers.html#a2">snd_pcm_format_linear</a> (<a class="el" href="group___p_c_m.html#a11">snd_pcm_format_t</a> format)</td></tr> <tr><td> </td><td><font size=-1><em>Return linear info for a PCM sample format.</em> <a href="#a2"></a><em></em></font><br><br></td></tr> <tr><td nowrap align=right valign=top>int </td><td valign=bottom><a class="el" href="group___p_c_m___helpers.html#a3">snd_pcm_format_float</a> (<a class="el" href="group___p_c_m.html#a11">snd_pcm_format_t</a> format)</td></tr> <tr><td> </td><td><font size=-1><em>Return float info for a PCM sample format.</em> <a href="#a3"></a><em></em></font><br><br></td></tr> <tr><td nowrap align=right valign=top>int </td><td valign=bottom><a class="el" href="group___p_c_m___helpers.html#a4">snd_pcm_format_little_endian</a> (<a class="el" href="group___p_c_m.html#a11">snd_pcm_format_t</a> format)</td></tr> <tr><td> </td><td><font size=-1><em>Return endian info for a PCM sample format.</em> <a href="#a4"></a><em></em></font><br><br></td></tr> <tr><td nowrap align=right valign=top>int </td><td valign=bottom><a class="el" href="group___p_c_m___helpers.html#a5">snd_pcm_format_big_endian</a> (<a class="el" href="group___p_c_m.html#a11">snd_pcm_format_t</a> format)</td></tr> <tr><td> </td><td><font size=-1><em>Return endian info for a PCM sample format.</em> <a href="#a5"></a><em></em></font><br><br></td></tr> <tr><td nowrap align=right valign=top>int </td><td valign=bottom><a class="el" href="group___p_c_m___helpers.html#a6">snd_pcm_format_cpu_endian</a> (<a class="el" href="group___p_c_m.html#a11">snd_pcm_format_t</a> format)</td></tr> <tr><td> </td><td><font size=-1><em>Return endian info for a PCM sample format.</em> <a href="#a6"></a><em></em></font><br><br></td></tr> <tr><td nowrap align=right valign=top>int </td><td valign=bottom><a class="el" href="group___p_c_m___helpers.html#a7">snd_pcm_format_width</a> (<a class="el" href="group___p_c_m.html#a11">snd_pcm_format_t</a> format)</td></tr> <tr><td> </td><td><font size=-1><em>Return nominal bits per a PCM sample.</em> <a href="#a7"></a><em></em></font><br><br></td></tr> <tr><td nowrap align=right valign=top>int </td><td valign=bottom><a class="el" href="group___p_c_m___helpers.html#a8">snd_pcm_format_physical_width</a> (<a class="el" href="group___p_c_m.html#a11">snd_pcm_format_t</a> format)</td></tr> <tr><td> </td><td><font size=-1><em>Return bits needed to store a PCM sample.</em> <a href="#a8"></a><em></em></font><br><br></td></tr> <tr><td nowrap align=right valign=top><a class="el" href="group___p_c_m.html#a11">snd_pcm_format_t</a> </td><td valign=bottom><a class="el" href="group___p_c_m___helpers.html#a9">snd_pcm_build_linear_format</a> (int width, int pwidth, int unsignd, int big_endian)</td></tr> <tr><td> </td><td><font size=-1><em>Compose a PCM sample linear format.</em> <a href="#a9"></a><em></em></font><br><br></td></tr> <tr><td nowrap align=right valign=top>ssize_t </td><td valign=bottom><a class="el" href="group___p_c_m___helpers.html#a10">snd_pcm_format_size</a> (<a class="el" href="group___p_c_m.html#a11">snd_pcm_format_t</a> format, size_t samples)</td></tr> <tr><td> </td><td><font size=-1><em>Return bytes needed to store a quantity of PCM sample.</em> <a href="#a10"></a><em></em></font><br><br></td></tr> <tr><td nowrap align=right valign=top>u_int8_t </td><td valign=bottom><a class="el" href="group___p_c_m___helpers.html#a11">snd_pcm_format_silence</a> (<a class="el" href="group___p_c_m.html#a11">snd_pcm_format_t</a> format)</td></tr> <tr><td> </td><td><font size=-1><em>Return 8 bit expressing silence for a PCM sample format.</em> <a href="#a11"></a><em></em></font><br><br></td></tr> <tr><td nowrap align=right valign=top>u_int16_t </td><td valign=bottom><a class="el" href="group___p_c_m___helpers.html#a12">snd_pcm_format_silence_16</a> (<a class="el" href="group___p_c_m.html#a11">snd_pcm_format_t</a> format)</td></tr> <tr><td> </td><td><font size=-1><em>Return 16 bit expressing silence for a PCM sample format.</em> <a href="#a12"></a><em></em></font><br><br></td></tr> <tr><td nowrap align=right valign=top>u_int32_t </td><td valign=bottom><a class="el" href="group___p_c_m___helpers.html#a13">snd_pcm_format_silence_32</a> (<a class="el" href="group___p_c_m.html#a11">snd_pcm_format_t</a> format)</td></tr> <tr><td> </td><td><font size=-1><em>Return 32 bit expressing silence for a PCM sample format.</em> <a href="#a13"></a><em></em></font><br><br></td></tr> <tr><td nowrap align=right valign=top>u_int64_t </td><td valign=bottom><a class="el" href="group___p_c_m___helpers.html#a14">snd_pcm_format_silence_64</a> (<a class="el" href="group___p_c_m.html#a11">snd_pcm_format_t</a> format)</td></tr> <tr><td> </td><td><font size=-1><em>Return 64 bit expressing silence for a PCM sample format.</em> <a href="#a14"></a><em></em></font><br><br></td></tr> <tr><td nowrap align=right valign=top>int </td><td valign=bottom><a class="el" href="group___p_c_m___helpers.html#a15">snd_pcm_format_set_silence</a> (<a class="el" href="group___p_c_m.html#a11">snd_pcm_format_t</a> format, void *buf, unsigned int samples)</td></tr> <tr><td> </td><td><font size=-1><em>Silence a PCM samples buffer.</em> <a href="#a15"></a><em></em></font><br><br></td></tr> <tr><td nowrap align=right valign=top><a class="el" href="group___p_c_m.html#a18">snd_pcm_sframes_t</a> </td><td valign=bottom><a class="el" href="group___p_c_m___helpers.html#a16">snd_pcm_bytes_to_frames</a> (<a class="el" href="group___p_c_m.html#a20">snd_pcm_t</a> *pcm, ssize_t bytes)</td></tr> <tr><td> </td><td><font size=-1><em>Convert bytes in frames for a PCM.</em> <a href="#a16"></a><em></em></font><br><br></td></tr> <tr><td nowrap align=right valign=top>ssize_t </td><td valign=bottom><a class="el" href="group___p_c_m___helpers.html#a17">snd_pcm_frames_to_bytes</a> (<a class="el" href="group___p_c_m.html#a20">snd_pcm_t</a> *pcm, <a class="el" href="group___p_c_m.html#a18">snd_pcm_sframes_t</a> frames)</td></tr> <tr><td> </td><td><font size=-1><em>Convert frames in bytes for a PCM.</em> <a href="#a17"></a><em></em></font><br><br></td></tr> <tr><td nowrap align=right valign=top>long </td><td valign=bottom><a class="el" href="group___p_c_m___helpers.html#a18">snd_pcm_bytes_to_samples</a> (<a class="el" href="group___p_c_m.html#a20">snd_pcm_t</a> *pcm, ssize_t bytes)</td></tr> <tr><td> </td><td><font size=-1><em>Convert bytes in samples for a PCM.</em> <a href="#a18"></a><em></em></font><br><br></td></tr> <tr><td nowrap align=right valign=top>ssize_t </td><td valign=bottom><a class="el" href="group___p_c_m___helpers.html#a19">snd_pcm_samples_to_bytes</a> (<a class="el" href="group___p_c_m.html#a20">snd_pcm_t</a> *pcm, long samples)</td></tr> <tr><td> </td><td><font size=-1><em>Convert samples in bytes for a PCM.</em> <a href="#a19"></a><em></em></font><br><br></td></tr> <tr><td nowrap align=right valign=top>int </td><td valign=bottom><a class="el" href="group___p_c_m___helpers.html#a20">snd_pcm_area_silence</a> (const <a class="el" href="group___p_c_m.html#a22">snd_pcm_channel_area_t</a> *dst_channel, <a class="el" href="group___p_c_m.html#a17">snd_pcm_uframes_t</a> dst_offset, unsigned int samples, <a class="el" href="group___p_c_m.html#a11">snd_pcm_format_t</a> format)</td></tr> <tr><td> </td><td><font size=-1><em>Silence an area.</em> <a href="#a20"></a><em></em></font><br><br></td></tr> <tr><td nowrap align=right valign=top>int </td><td valign=bottom><a class="el" href="group___p_c_m___helpers.html#a21">snd_pcm_areas_silence</a> (const <a class="el" href="group___p_c_m.html#a22">snd_pcm_channel_area_t</a> *dst_channels, <a class="el" href="group___p_c_m.html#a17">snd_pcm_uframes_t</a> dst_offset, unsigned int channels, <a class="el" href="group___p_c_m.html#a17">snd_pcm_uframes_t</a> frames, <a class="el" href="group___p_c_m.html#a11">snd_pcm_format_t</a> format)</td></tr> <tr><td> </td><td><font size=-1><em>Silence one or more areas.</em> <a href="#a21"></a><em></em></font><br><br></td></tr> <tr><td nowrap align=right valign=top>int </td><td valign=bottom><a class="el" href="group___p_c_m___helpers.html#a22">snd_pcm_area_copy</a> (const <a class="el" href="group___p_c_m.html#a22">snd_pcm_channel_area_t</a> *dst_channel, <a class="el" href="group___p_c_m.html#a17">snd_pcm_uframes_t</a> dst_offset, const <a class="el" href="group___p_c_m.html#a22">snd_pcm_channel_area_t</a> *src_channel, <a class="el" href="group___p_c_m.html#a17">snd_pcm_uframes_t</a> src_offset, unsigned int samples, <a class="el" href="group___p_c_m.html#a11">snd_pcm_format_t</a> format)</td></tr> <tr><td> </td><td><font size=-1><em>Copy an area.</em> <a href="#a22"></a><em></em></font><br><br></td></tr> <tr><td nowrap align=right valign=top>int </td><td valign=bottom><a class="el" href="group___p_c_m___helpers.html#a23">snd_pcm_areas_copy</a> (const <a class="el" href="group___p_c_m.html#a22">snd_pcm_channel_area_t</a> *dst_channels, <a class="el" href="group___p_c_m.html#a17">snd_pcm_uframes_t</a> dst_offset, const <a class="el" href="group___p_c_m.html#a22">snd_pcm_channel_area_t</a> *src_channels, <a class="el" href="group___p_c_m.html#a17">snd_pcm_uframes_t</a> src_offset, unsigned int channels, <a class="el" href="group___p_c_m.html#a17">snd_pcm_uframes_t</a> frames, <a class="el" href="group___p_c_m.html#a11">snd_pcm_format_t</a> format)</td></tr> <tr><td> </td><td><font size=-1><em>Copy one or more areas.</em> <a href="#a23"></a><em></em></font><br><br></td></tr> </table> <hr><a name="_details"></a><h2>Detailed Description</h2> See the <a href="pcm.html#pcm">PCM (digital audio) interface</a> page for more details. <hr><h2>Function Documentation</h2> <a name="a22" doxytag="pcm.h::snd_pcm_area_copy"></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> int snd_pcm_area_copy </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">const <a class="el" href="group___p_c_m.html#a22">snd_pcm_channel_area_t</a> * </td> <td class="mdname" nowrap> <em>dst_area</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap><a class="el" href="group___p_c_m.html#a17">snd_pcm_uframes_t</a> </td> <td class="mdname" nowrap> <em>dst_offset</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>const <a class="el" href="group___p_c_m.html#a22">snd_pcm_channel_area_t</a> * </td> <td class="mdname" nowrap> <em>src_area</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap><a class="el" href="group___p_c_m.html#a17">snd_pcm_uframes_t</a> </td> <td class="mdname" nowrap> <em>src_offset</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>unsigned int </td> <td class="mdname" nowrap> <em>samples</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap><a class="el" href="group___p_c_m.html#a11">snd_pcm_format_t</a> </td> <td class="mdname" nowrap> <em>format</em></td> </tr> <tr> <td></td> <td class="md">) </td> <td class="md" colspan="2"></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Copy an area. <p> <dl compact><dt><b>Parameters: </b></dt><dd> <table border=0 cellspacing=2 cellpadding=0> <tr><td valign=top><em>dst_area</em> </td><td> destination area specification </td></tr> <tr><td valign=top><em>dst_offset</em> </td><td> offset in frames inside destination area </td></tr> <tr><td valign=top><em>src_area</em> </td><td> source area specification </td></tr> <tr><td valign=top><em>src_offset</em> </td><td> offset in frames inside source area </td></tr> <tr><td valign=top><em>samples</em> </td><td> samples to copy </td></tr> <tr><td valign=top><em>format</em> </td><td> PCM sample format </td></tr> </table> </dl><dl compact><dt><b>Returns: </b></dt><dd> 0 on success otherwise a negative error code </dl> </td> </tr> </table> <a name="a20" doxytag="pcm.h::snd_pcm_area_silence"></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> int snd_pcm_area_silence </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">const <a class="el" href="group___p_c_m.html#a22">snd_pcm_channel_area_t</a> * </td> <td class="mdname" nowrap> <em>dst_area</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap><a class="el" href="group___p_c_m.html#a17">snd_pcm_uframes_t</a> </td> <td class="mdname" nowrap> <em>dst_offset</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>unsigned int </td> <td class="mdname" nowrap> <em>samples</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap><a class="el" href="group___p_c_m.html#a11">snd_pcm_format_t</a> </td> <td class="mdname" nowrap> <em>format</em></td> </tr> <tr> <td></td> <td class="md">) </td> <td class="md" colspan="2"></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Silence an area. <p> <dl compact><dt><b>Parameters: </b></dt><dd> <table border=0 cellspacing=2 cellpadding=0> <tr><td valign=top><em>dst_area</em> </td><td> area specification </td></tr> <tr><td valign=top><em>dst_offset</em> </td><td> offset in frames inside area </td></tr> <tr><td valign=top><em>samples</em> </td><td> samples to silence </td></tr> <tr><td valign=top><em>format</em> </td><td> PCM sample format </td></tr> </table> </dl><dl compact><dt><b>Returns: </b></dt><dd> 0 on success otherwise a negative error code </dl> </td> </tr> </table> <a name="a23" doxytag="pcm.h::snd_pcm_areas_copy"></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> int snd_pcm_areas_copy </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">const <a class="el" href="group___p_c_m.html#a22">snd_pcm_channel_area_t</a> * </td> <td class="mdname" nowrap> <em>dst_areas</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap><a class="el" href="group___p_c_m.html#a17">snd_pcm_uframes_t</a> </td> <td class="mdname" nowrap> <em>dst_offset</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>const <a class="el" href="group___p_c_m.html#a22">snd_pcm_channel_area_t</a> * </td> <td class="mdname" nowrap> <em>src_areas</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap><a class="el" href="group___p_c_m.html#a17">snd_pcm_uframes_t</a> </td> <td class="mdname" nowrap> <em>src_offset</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>unsigned int </td> <td class="mdname" nowrap> <em>channels</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap><a class="el" href="group___p_c_m.html#a17">snd_pcm_uframes_t</a> </td> <td class="mdname" nowrap> <em>frames</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap><a class="el" href="group___p_c_m.html#a11">snd_pcm_format_t</a> </td> <td class="mdname" nowrap> <em>format</em></td> </tr> <tr> <td></td> <td class="md">) </td> <td class="md" colspan="2"></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Copy one or more areas. <p> <dl compact><dt><b>Parameters: </b></dt><dd> <table border=0 cellspacing=2 cellpadding=0> <tr><td valign=top><em>dst_areas</em> </td><td> destination areas specification (one for each channel) </td></tr> <tr><td valign=top><em>dst_offset</em> </td><td> offset in frames inside destination area </td></tr> <tr><td valign=top><em>src_areas</em> </td><td> source areas specification (one for each channel) </td></tr> <tr><td valign=top><em>src_offset</em> </td><td> offset in frames inside source area </td></tr> <tr><td valign=top><em>channels</em> </td><td> channels count </td></tr> <tr><td valign=top><em>frames</em> </td><td> frames to copy </td></tr> <tr><td valign=top><em>format</em> </td><td> PCM sample format </td></tr> </table> </dl><dl compact><dt><b>Returns: </b></dt><dd> 0 on success otherwise a negative error code </dl> </td> </tr> </table> <a name="a21" doxytag="pcm.h::snd_pcm_areas_silence"></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> int snd_pcm_areas_silence </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">const <a class="el" href="group___p_c_m.html#a22">snd_pcm_channel_area_t</a> * </td> <td class="mdname" nowrap> <em>dst_areas</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap><a class="el" href="group___p_c_m.html#a17">snd_pcm_uframes_t</a> </td> <td class="mdname" nowrap> <em>dst_offset</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>unsigned int </td> <td class="mdname" nowrap> <em>channels</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap><a class="el" href="group___p_c_m.html#a17">snd_pcm_uframes_t</a> </td> <td class="mdname" nowrap> <em>frames</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap><a class="el" href="group___p_c_m.html#a11">snd_pcm_format_t</a> </td> <td class="mdname" nowrap> <em>format</em></td> </tr> <tr> <td></td> <td class="md">) </td> <td class="md" colspan="2"></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Silence one or more areas. <p> <dl compact><dt><b>Parameters: </b></dt><dd> <table border=0 cellspacing=2 cellpadding=0> <tr><td valign=top><em>dst_areas</em> </td><td> areas specification (one for each channel) </td></tr> <tr><td valign=top><em>dst_offset</em> </td><td> offset in frames inside area </td></tr> <tr><td valign=top><em>channels</em> </td><td> channels count </td></tr> <tr><td valign=top><em>frames</em> </td><td> frames to silence </td></tr> <tr><td valign=top><em>format</em> </td><td> PCM sample format </td></tr> </table> </dl><dl compact><dt><b>Returns: </b></dt><dd> 0 on success otherwise a negative error code </dl> </td> </tr> </table> <a name="a9" doxytag="pcm.h::snd_pcm_build_linear_format"></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> <a class="el" href="group___p_c_m.html#a11">snd_pcm_format_t</a> snd_pcm_build_linear_format </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">int </td> <td class="mdname" nowrap> <em>width</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>int </td> <td class="mdname" nowrap> <em>pwidth</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>int </td> <td class="mdname" nowrap> <em>unsignd</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>int </td> <td class="mdname" nowrap> <em>big_endian</em></td> </tr> <tr> <td></td> <td class="md">) </td> <td class="md" colspan="2"></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Compose a PCM sample linear format. <p> <dl compact><dt><b>Parameters: </b></dt><dd> <table border=0 cellspacing=2 cellpadding=0> <tr><td valign=top><em>width</em> </td><td> Nominal bits per sample </td></tr> <tr><td valign=top><em>pwidth</em> </td><td> Physical bit width of the format </td></tr> <tr><td valign=top><em>unsignd</em> </td><td> Sign: 0 signed, 1 unsigned </td></tr> </table> </dl><dl compact><dt><b>Returns: </b></dt><dd> big_endian Endian: 0 little endian, 1 big endian </dl> </td> </tr> </table> <a name="a16" doxytag="pcm.h::snd_pcm_bytes_to_frames"></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> <a class="el" href="group___p_c_m.html#a18">snd_pcm_sframes_t</a> snd_pcm_bytes_to_frames </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top"><a class="el" href="group___p_c_m.html#a20">snd_pcm_t</a> * </td> <td class="mdname" nowrap> <em>pcm</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>ssize_t </td> <td class="mdname" nowrap> <em>bytes</em></td> </tr> <tr> <td></td> <td class="md">) </td> <td class="md" colspan="2"></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Convert bytes in frames for a PCM. <p> <dl compact><dt><b>Parameters: </b></dt><dd> <table border=0 cellspacing=2 cellpadding=0> <tr><td valign=top><em>pcm</em> </td><td> PCM handle </td></tr> <tr><td valign=top><em>bytes</em> </td><td> quantity in bytes </td></tr> </table> </dl><dl compact><dt><b>Returns: </b></dt><dd> quantity expressed in frames </dl> </td> </tr> </table> <a name="a18" doxytag="pcm.h::snd_pcm_bytes_to_samples"></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> long snd_pcm_bytes_to_samples </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top"><a class="el" href="group___p_c_m.html#a20">snd_pcm_t</a> * </td> <td class="mdname" nowrap> <em>pcm</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>ssize_t </td> <td class="mdname" nowrap> <em>bytes</em></td> </tr> <tr> <td></td> <td class="md">) </td> <td class="md" colspan="2"></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Convert bytes in samples for a PCM. <p> <dl compact><dt><b>Parameters: </b></dt><dd> <table border=0 cellspacing=2 cellpadding=0> <tr><td valign=top><em>pcm</em> </td><td> PCM handle </td></tr> <tr><td valign=top><em>bytes</em> </td><td> quantity in bytes </td></tr> </table> </dl><dl compact><dt><b>Returns: </b></dt><dd> quantity expressed in samples </dl> </td> </tr> </table> <a name="a5" doxytag="pcm.h::snd_pcm_format_big_endian"></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> int snd_pcm_format_big_endian </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top"><a class="el" href="group___p_c_m.html#a11">snd_pcm_format_t</a> </td> <td class="mdname1" valign="top" nowrap> <em>format</em> </td> <td class="md" valign="top">) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Return endian info for a PCM sample format. <p> <dl compact><dt><b>Parameters: </b></dt><dd> <table border=0 cellspacing=2 cellpadding=0> <tr><td valign=top><em>format</em> </td><td> Format </td></tr> </table> </dl><dl compact><dt><b>Returns: </b></dt><dd> 0 little endian, 1 big endian, a negative error code if endian independent </dl> </td> </tr> </table> <a name="a6" doxytag="pcm.h::snd_pcm_format_cpu_endian"></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> int snd_pcm_format_cpu_endian </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top"><a class="el" href="group___p_c_m.html#a11">snd_pcm_format_t</a> </td> <td class="mdname1" valign="top" nowrap> <em>format</em> </td> <td class="md" valign="top">) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Return endian info for a PCM sample format. <p> <dl compact><dt><b>Parameters: </b></dt><dd> <table border=0 cellspacing=2 cellpadding=0> <tr><td valign=top><em>format</em> </td><td> Format </td></tr> </table> </dl><dl compact><dt><b>Returns: </b></dt><dd> 0 swapped, 1 CPU endian, a negative error code if endian independent </dl> </td> </tr> </table> <a name="a3" doxytag="pcm.h::snd_pcm_format_float"></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> int snd_pcm_format_float </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top"><a class="el" href="group___p_c_m.html#a11">snd_pcm_format_t</a> </td> <td class="mdname1" valign="top" nowrap> <em>format</em> </td> <td class="md" valign="top">) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Return float info for a PCM sample format. <p> <dl compact><dt><b>Parameters: </b></dt><dd> <table border=0 cellspacing=2 cellpadding=0> <tr><td valign=top><em>format</em> </td><td> Format </td></tr> </table> </dl><dl compact><dt><b>Returns: </b></dt><dd> 0 non float, 1 float </dl> </td> </tr> </table> <a name="a2" doxytag="pcm.h::snd_pcm_format_linear"></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> int snd_pcm_format_linear </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top"><a class="el" href="group___p_c_m.html#a11">snd_pcm_format_t</a> </td> <td class="mdname1" valign="top" nowrap> <em>format</em> </td> <td class="md" valign="top">) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Return linear info for a PCM sample format. <p> <dl compact><dt><b>Parameters: </b></dt><dd> <table border=0 cellspacing=2 cellpadding=0> <tr><td valign=top><em>format</em> </td><td> Format </td></tr> </table> </dl><dl compact><dt><b>Returns: </b></dt><dd> 0 non linear, 1 linear </dl> </td> </tr> </table> <a name="a4" doxytag="pcm.h::snd_pcm_format_little_endian"></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> int snd_pcm_format_little_endian </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top"><a class="el" href="group___p_c_m.html#a11">snd_pcm_format_t</a> </td> <td class="mdname1" valign="top" nowrap> <em>format</em> </td> <td class="md" valign="top">) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Return endian info for a PCM sample format. <p> <dl compact><dt><b>Parameters: </b></dt><dd> <table border=0 cellspacing=2 cellpadding=0> <tr><td valign=top><em>format</em> </td><td> Format </td></tr> </table> </dl><dl compact><dt><b>Returns: </b></dt><dd> 0 big endian, 1 little endian, a negative error code if endian independent </dl> </td> </tr> </table> <a name="a8" doxytag="pcm.h::snd_pcm_format_physical_width"></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> int snd_pcm_format_physical_width </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top"><a class="el" href="group___p_c_m.html#a11">snd_pcm_format_t</a> </td> <td class="mdname1" valign="top" nowrap> <em>format</em> </td> <td class="md" valign="top">) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Return bits needed to store a PCM sample. <p> <dl compact><dt><b>Parameters: </b></dt><dd> <table border=0 cellspacing=2 cellpadding=0> <tr><td valign=top><em>format</em> </td><td> Sample format </td></tr> </table> </dl><dl compact><dt><b>Returns: </b></dt><dd> bits per sample, a negative error code if not applicable </dl> </td> </tr> </table> <a name="a15" doxytag="pcm.h::snd_pcm_format_set_silence"></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> int snd_pcm_format_set_silence </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top"><a class="el" href="group___p_c_m.html#a11">snd_pcm_format_t</a> </td> <td class="mdname" nowrap> <em>format</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>void * </td> <td class="mdname" nowrap> <em>data</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>unsigned int </td> <td class="mdname" nowrap> <em>samples</em></td> </tr> <tr> <td></td> <td class="md">) </td> <td class="md" colspan="2"></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Silence a PCM samples buffer. <p> <dl compact><dt><b>Parameters: </b></dt><dd> <table border=0 cellspacing=2 cellpadding=0> <tr><td valign=top><em>format</em> </td><td> Sample format </td></tr> <tr><td valign=top><em>data</em> </td><td> Buffer </td></tr> </table> </dl><dl compact><dt><b>Returns: </b></dt><dd> samples Samples count </dl><dl compact><dt><b>Examples: </b></dt><dd> <a class="el" href="_2test_2latency_8c-example.html#a36">/test/latency.c</a>.</dl> </td> </tr> </table> <a name="a0" doxytag="pcm.h::snd_pcm_format_signed"></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> int snd_pcm_format_signed </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top"><a class="el" href="group___p_c_m.html#a11">snd_pcm_format_t</a> </td> <td class="mdname1" valign="top" nowrap> <em>format</em> </td> <td class="md" valign="top">) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Return sign info for a PCM sample linear format. <p> <dl compact><dt><b>Parameters: </b></dt><dd> <table border=0 cellspacing=2 cellpadding=0> <tr><td valign=top><em>format</em> </td><td> Format </td></tr> </table> </dl><dl compact><dt><b>Returns: </b></dt><dd> 0 unsigned, 1 signed, a negative error code if format is not linear </dl> </td> </tr> </table> <a name="a11" doxytag="pcm.h::snd_pcm_format_silence"></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> u_int8_t snd_pcm_format_silence </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top"><a class="el" href="group___p_c_m.html#a11">snd_pcm_format_t</a> </td> <td class="mdname1" valign="top" nowrap> <em>format</em> </td> <td class="md" valign="top">) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Return 8 bit expressing silence for a PCM sample format. <p> <dl compact><dt><b>Parameters: </b></dt><dd> <table border=0 cellspacing=2 cellpadding=0> <tr><td valign=top><em>format</em> </td><td> Sample format </td></tr> </table> </dl><dl compact><dt><b>Returns: </b></dt><dd> silence 8 bit word </dl> </td> </tr> </table> <a name="a12" doxytag="pcm.h::snd_pcm_format_silence_16"></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> u_int16_t snd_pcm_format_silence_16 </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top"><a class="el" href="group___p_c_m.html#a11">snd_pcm_format_t</a> </td> <td class="mdname1" valign="top" nowrap> <em>format</em> </td> <td class="md" valign="top">) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Return 16 bit expressing silence for a PCM sample format. <p> <dl compact><dt><b>Parameters: </b></dt><dd> <table border=0 cellspacing=2 cellpadding=0> <tr><td valign=top><em>format</em> </td><td> Sample format </td></tr> </table> </dl><dl compact><dt><b>Returns: </b></dt><dd> silence 16 bit word </dl> </td> </tr> </table> <a name="a13" doxytag="pcm.h::snd_pcm_format_silence_32"></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> u_int32_t snd_pcm_format_silence_32 </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top"><a class="el" href="group___p_c_m.html#a11">snd_pcm_format_t</a> </td> <td class="mdname1" valign="top" nowrap> <em>format</em> </td> <td class="md" valign="top">) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Return 32 bit expressing silence for a PCM sample format. <p> <dl compact><dt><b>Parameters: </b></dt><dd> <table border=0 cellspacing=2 cellpadding=0> <tr><td valign=top><em>format</em> </td><td> Sample format </td></tr> </table> </dl><dl compact><dt><b>Returns: </b></dt><dd> silence 32 bit word </dl> </td> </tr> </table> <a name="a14" doxytag="pcm.h::snd_pcm_format_silence_64"></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> u_int64_t snd_pcm_format_silence_64 </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top"><a class="el" href="group___p_c_m.html#a11">snd_pcm_format_t</a> </td> <td class="mdname1" valign="top" nowrap> <em>format</em> </td> <td class="md" valign="top">) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Return 64 bit expressing silence for a PCM sample format. <p> <dl compact><dt><b>Parameters: </b></dt><dd> <table border=0 cellspacing=2 cellpadding=0> <tr><td valign=top><em>format</em> </td><td> Sample format </td></tr> </table> </dl><dl compact><dt><b>Returns: </b></dt><dd> silence 64 bit word </dl> </td> </tr> </table> <a name="a10" doxytag="pcm.h::snd_pcm_format_size"></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> ssize_t snd_pcm_format_size </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top"><a class="el" href="group___p_c_m.html#a11">snd_pcm_format_t</a> </td> <td class="mdname" nowrap> <em>format</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>size_t </td> <td class="mdname" nowrap> <em>samples</em></td> </tr> <tr> <td></td> <td class="md">) </td> <td class="md" colspan="2"></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Return bytes needed to store a quantity of PCM sample. <p> <dl compact><dt><b>Parameters: </b></dt><dd> <table border=0 cellspacing=2 cellpadding=0> <tr><td valign=top><em>format</em> </td><td> Sample format </td></tr> <tr><td valign=top><em>samples</em> </td><td> Samples count </td></tr> </table> </dl><dl compact><dt><b>Returns: </b></dt><dd> bytes needed, a negative error code if not integer or unknown </dl> </td> </tr> </table> <a name="a1" doxytag="pcm.h::snd_pcm_format_unsigned"></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> int snd_pcm_format_unsigned </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top"><a class="el" href="group___p_c_m.html#a11">snd_pcm_format_t</a> </td> <td class="mdname1" valign="top" nowrap> <em>format</em> </td> <td class="md" valign="top">) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Return sign info for a PCM sample linear format. <p> <dl compact><dt><b>Parameters: </b></dt><dd> <table border=0 cellspacing=2 cellpadding=0> <tr><td valign=top><em>format</em> </td><td> Format </td></tr> </table> </dl><dl compact><dt><b>Returns: </b></dt><dd> 0 signed, 1 unsigned, a negative error code if format is not linear </dl> </td> </tr> </table> <a name="a7" doxytag="pcm.h::snd_pcm_format_width"></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> int snd_pcm_format_width </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top"><a class="el" href="group___p_c_m.html#a11">snd_pcm_format_t</a> </td> <td class="mdname1" valign="top" nowrap> <em>format</em> </td> <td class="md" valign="top">) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Return nominal bits per a PCM sample. <p> <dl compact><dt><b>Parameters: </b></dt><dd> <table border=0 cellspacing=2 cellpadding=0> <tr><td valign=top><em>format</em> </td><td> Sample format </td></tr> </table> </dl><dl compact><dt><b>Returns: </b></dt><dd> bits per sample, a negative error code if not applicable </dl><dl compact><dt><b>Examples: </b></dt><dd> <a class="el" href="_2test_2latency_8c-example.html#a29">/test/latency.c</a>, and <a class="el" href="_2test_2pcm_8c-example.html#a41">/test/pcm.c</a>.</dl> </td> </tr> </table> <a name="a17" doxytag="pcm.h::snd_pcm_frames_to_bytes"></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> ssize_t snd_pcm_frames_to_bytes </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top"><a class="el" href="group___p_c_m.html#a20">snd_pcm_t</a> * </td> <td class="mdname" nowrap> <em>pcm</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap><a class="el" href="group___p_c_m.html#a18">snd_pcm_sframes_t</a> </td> <td class="mdname" nowrap> <em>frames</em></td> </tr> <tr> <td></td> <td class="md">) </td> <td class="md" colspan="2"></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Convert frames in bytes for a PCM. <p> <dl compact><dt><b>Parameters: </b></dt><dd> <table border=0 cellspacing=2 cellpadding=0> <tr><td valign=top><em>pcm</em> </td><td> PCM handle </td></tr> <tr><td valign=top><em>frames</em> </td><td> quantity in frames </td></tr> </table> </dl><dl compact><dt><b>Returns: </b></dt><dd> quantity expressed in bytes </dl> </td> </tr> </table> <a name="a19" doxytag="pcm.h::snd_pcm_samples_to_bytes"></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> ssize_t snd_pcm_samples_to_bytes </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top"><a class="el" href="group___p_c_m.html#a20">snd_pcm_t</a> * </td> <td class="mdname" nowrap> <em>pcm</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>long </td> <td class="mdname" nowrap> <em>samples</em></td> </tr> <tr> <td></td> <td class="md">) </td> <td class="md" colspan="2"></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Convert samples in bytes for a PCM. <p> <dl compact><dt><b>Parameters: </b></dt><dd> <table border=0 cellspacing=2 cellpadding=0> <tr><td valign=top><em>pcm</em> </td><td> PCM handle </td></tr> <tr><td valign=top><em>samples</em> </td><td> quantity in samples </td></tr> </table> </dl><dl compact><dt><b>Returns: </b></dt><dd> quantity expressed in bytes </dl> </td> </tr> </table> <hr><address style="align: right;"><small>Generated on Wed Apr 2 16:06:38 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>