Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > bad97183153701b09df5fae1052b1c30 > files > 1314

crystalspace-doc-1.2.1-5mdv2010.0.i586.rpm

<!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>Crystal Space 1.2.1: csplugincommon/sndsys/convert.h File Reference (Crystal Space 1.2.1 Public API Reference)</title>
<link href="tabs.css" rel="stylesheet" type="text/css">
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<table border="0" cellpadding="0" cellspacing="0" width="100%" class="head">
 <tr height="59">
  <td class="head" width="202" valign="bottom" style="padding-left:0;"><a href="http://www.crystalspace3d.org/"><img src="csblur.png" width="236" height="59" alt="CrystalSpace" border="0"></a></td>
  <td class="head"><h2>Public API Reference</h2></td>
 </tr>
 <tr height="11">
  <td colspan="2" class="headshadow" valign="top" style="padding-left:0;"><img src="csblurb.png" width="236" height="11" alt="" border="0"></td>
 </tr>
</table>
<div class="content">
<!-- Generated by Doxygen 1.5.3 -->
<div class="tabs">
  <ul>
    <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
    <li><a href="modules.html"><span>Modules</span></a></li>
    <li><a href="namespaces.html"><span>Namespaces</span></a></li>
    <li><a href="classes.html"><span>Classes</span></a></li>
    <li class="current"><a href="files.html"><span>Files</span></a></li>
    <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
  </ul>
</div>
<h1>csplugincommon/sndsys/convert.h File Reference</h1>Some helper functions for sound elements. <a href="#_details">More...</a>
<p>

<p>
<a href="convert_8h-source.html">Go to the source code of this file.</a><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Namespaces</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">namespace &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceCS.html">CS</a></td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">namespace &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceCS_1_1SndSys.html">CS::SndSys</a></td></tr>

<tr><td colspan="2"><br><h2>Classes</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCS_1_1SndSys_1_1PCMSampleConverter.html">CS::SndSys::PCMSampleConverter</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A <a class="el" href="classCS_1_1SndSys_1_1PCMSampleConverter.html" title="A PCMSampleConverter object converts PCM data from one format to another.">PCMSampleConverter</a> object converts PCM data from one format to another.  <a href="classCS_1_1SndSys_1_1PCMSampleConverter.html#_details">More...</a><br></td></tr>
<tr><td colspan="2"><br><h2>Defines</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="convert_8h.html#3753a3357de67633466955d89dc78aca">CS_SOUND_ELEMENT_MAX_CHANNELS</a>&nbsp;&nbsp;&nbsp;8</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This is the maximum number of channels we'll mix.  <a href="#3753a3357de67633466955d89dc78aca"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="convert_8h.html#1e4762f59d72a6cf34ce725c5adc9c93">CS_SOUND_INTERNAL_FREQUENCY_DIVISOR</a>&nbsp;&nbsp;&nbsp;1024</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This setting controls how many steps are used internally between source samples.  <a href="#1e4762f59d72a6cf34ce725c5adc9c93"></a><br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
Some helper functions for sound elements. 
<p>

<p>Definition in file <a class="el" href="convert_8h-source.html">convert.h</a>.</p>
<hr><h2>Define Documentation</h2>
<a class="anchor" name="3753a3357de67633466955d89dc78aca"></a><!-- doxytag: member="convert.h::CS_SOUND_ELEMENT_MAX_CHANNELS" ref="3753a3357de67633466955d89dc78aca" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define CS_SOUND_ELEMENT_MAX_CHANNELS&nbsp;&nbsp;&nbsp;8          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
This is the maximum number of channels we'll mix. 
<p>
Mono sound is 1 channel Stereo is 2 channels 5.1 sound is 6 channels 
<p>Definition at line <a class="el" href="convert_8h-source.html#l00032">32</a> of file <a class="el" href="convert_8h-source.html">convert.h</a>.</p>

</div>
</div><p>
<a class="anchor" name="1e4762f59d72a6cf34ce725c5adc9c93"></a><!-- doxytag: member="convert.h::CS_SOUND_INTERNAL_FREQUENCY_DIVISOR" ref="1e4762f59d72a6cf34ce725c5adc9c93" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define CS_SOUND_INTERNAL_FREQUENCY_DIVISOR&nbsp;&nbsp;&nbsp;1024          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
This setting controls how many steps are used internally between source samples. 
<p>
Time is steped along based on the ratio of the input frequency to the output frequency. If the output frequency is twice as fast as the input frequency, then two times as many sample points are needed in the output as in the input. In order to generate samples that sound appropriate when the time is between two actual source samples, the amplitude of the sound wave at the given time is approximated by interpolating between two adjacent source samples. The position in the source data is internally represented by a signed integer which can be thought of as the sample number multiplied by this divisor value. The first sample is at CS_SOUND_INTERNAL_FREQUENCY_DIVISOR, the second is at 2*CS_SOUND_INTERNAL_FREQUENCY_DIVISOR. A position mid way between the two is at 1.5 * CS_SOUND_INTERNAL_FREQUENCY_DIVISOR.<p>
In order to keep things quick, use a power of 2 here (power of 2 division and multiplication will be optimized into a bit shift). This value is multiplied with frequency values and stored in a signed integer. Beware of making it too big! 
<p>Definition at line <a class="el" href="convert_8h-source.html#l00056">56</a> of file <a class="el" href="convert_8h-source.html">convert.h</a>.</p>

</div>
</div><p>
<hr size="1"><address><small>Generated for Crystal Space 1.2.1 by 
<a href="http://www.doxygen.org/index.html">doxygen</a> 1.5.3 
</small></address> </div></body> </html>