Sophie

Sophie

distrib > Fedora > 14 > x86_64 > media > os > by-pkgid > 9c481c872fb0ae0cbadccdc2f4a18ab6 > files > 142

libasync-devel-0.17.0-5.fc14.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"/>
<title>Async: Async::AudioCompressor Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.6.2-20100208 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li><a href="dirs.html"><span>Directories</span></a></li>
      <li><a href="examples.html"><span>Examples</span></a></li>
    </ul>
  </div>
  <div class="tabs">
    <ul>
      <li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
      <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
    </ul>
  </div>
  <div class="navpath"><a class="el" href="namespaceAsync.html">Async</a>::<a class="el" href="classAsync_1_1AudioCompressor.html">AudioCompressor</a>
  </div>
</div>
<div class="contents">
<h1>Async::AudioCompressor Class Reference</h1><!-- doxytag: class="Async::AudioCompressor" --><!-- doxytag: inherits="Async::AudioProcessor" -->
<p>A class to do audio compression/limiting.  
<a href="#_details">More...</a></p>

<p><code>#include &lt;<a class="el" href="AsyncAudioCompressor_8h_source.html">AsyncAudioCompressor.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for Async::AudioCompressor:</div>
<div class="dynsection">
 <div class="center">
  <img src="classAsync_1_1AudioCompressor.png" usemap="#Async::AudioCompressor_map" alt=""/>
  <map id="Async::AudioCompressor_map" name="Async::AudioCompressor_map">
<area href="classAsync_1_1AudioProcessor.html" alt="Async::AudioProcessor" shape="rect" coords="82,56,237,80"/>
<area href="classAsync_1_1AudioSink.html" alt="Async::AudioSink" shape="rect" coords="0,0,155,24"/>
<area href="classAsync_1_1AudioSource.html" alt="Async::AudioSource" shape="rect" coords="165,0,320,24"/>
</map>
 </div>
</div>

<p><a href="classAsync_1_1AudioCompressor-members.html">List of all members.</a></p>
<h2>Public Member Functions</h2>
<ul>
<li><a class="el" href="classAsync_1_1AudioCompressor.html#ae17aafba5a7382a9ddd755346d2751c1">AudioCompressor</a> (void)
<dl class="el"><dd class="mdescRight">Default constuctor.  <a href="#ae17aafba5a7382a9ddd755346d2751c1"></a><br/></dl><li><a class="el" href="classAsync_1_1AudioCompressor.html#a7014ea578f1bf870e8db3b7afeccf534">~AudioCompressor</a> (void)
<dl class="el"><dd class="mdescRight">Destructor.  <a href="#a7014ea578f1bf870e8db3b7afeccf534"></a><br/></dl><li>void <a class="el" href="classAsync_1_1AudioCompressor.html#aa2e5ed69261053a7f6a1ee8c9d8d69e9">setThreshold</a> (double thresh_db)
<dl class="el"><dd class="mdescRight">Set the compression threshold.  <a href="#aa2e5ed69261053a7f6a1ee8c9d8d69e9"></a><br/></dl><li>void <a class="el" href="classAsync_1_1AudioCompressor.html#a2a733dc6f08915c6c7daaf63b17133ef">setRatio</a> (double ratio)
<dl class="el"><dd class="mdescRight">Set the compression ratio.  <a href="#a2a733dc6f08915c6c7daaf63b17133ef"></a><br/></dl><li>void <a class="el" href="classAsync_1_1AudioCompressor.html#a98e17836146463254b295bacab75bfb7">setAttack</a> (double attack_ms)
<dl class="el"><dd class="mdescRight">Set the compressor attack time.  <a href="#a98e17836146463254b295bacab75bfb7"></a><br/></dl><li>void <a class="el" href="classAsync_1_1AudioCompressor.html#a03ce211a5ec025391881a5c13b550fc2">setDecay</a> (double decay_ms)
<dl class="el"><dd class="mdescRight">Set the compressor decay time.  <a href="#a03ce211a5ec025391881a5c13b550fc2"></a><br/></dl><li>void <a class="el" href="classAsync_1_1AudioCompressor.html#ae4c70c72b06a265b1e42174e29db9745">setOutputGain</a> (float gain)
<dl class="el"><dd class="mdescRight">Set the output gain.  <a href="#ae4c70c72b06a265b1e42174e29db9745"></a><br/></dl><li>void <a class="el" href="classAsync_1_1AudioCompressor.html#a9365703d0c65c8de53c0a29785a05878">reset</a> (void)
<dl class="el"><dd class="mdescRight">Reset the compressor.  <a href="#a9365703d0c65c8de53c0a29785a05878"></a><br/></dl></ul>
<h2>Protected Member Functions</h2>
<ul>
<li>virtual void <a class="el" href="classAsync_1_1AudioCompressor.html#aef62f704d4f3c108eec1ffec20006b8f">processSamples</a> (float *dest, const float *src, int count)
<dl class="el"><dd class="mdescRight">Process incoming samples and put them into the output buffer.  <a href="#aef62f704d4f3c108eec1ffec20006b8f"></a><br/></dl></ul>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>A class to do audio compression/limiting. </p>
<dl class="author"><dt><b>Author:</b></dt><dd>Tobias Blomberg / SM0SVX </dd></dl>
<dl class="date"><dt><b>Date:</b></dt><dd>2006-05-01</dd></dl>
<p>Use this audio pipe class to do compression on an audio stream. Compression is a method to reduce the dynamic range of an audio signal. After it has been compressed it can be amplified to get a more audible end result.</p>
<p>This audio pipe component is mostly untested and is based on some ripped off code which I really have not checked how it performs or if it works at all... </p>

<p>Definition at line <a class="el" href="AsyncAudioCompressor_8h_source.html#l00169">169</a> of file <a class="el" href="AsyncAudioCompressor_8h_source.html">AsyncAudioCompressor.h</a>.</p>
<hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="ae17aafba5a7382a9ddd755346d2751c1"></a><!-- doxytag: member="Async::AudioCompressor::AudioCompressor" ref="ae17aafba5a7382a9ddd755346d2751c1" args="(void)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Async::AudioCompressor::AudioCompressor </td>
          <td>(</td>
          <td class="paramtype">void&nbsp;</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Default constuctor. </p>

</div>
</div>
<a class="anchor" id="a7014ea578f1bf870e8db3b7afeccf534"></a><!-- doxytag: member="Async::AudioCompressor::~AudioCompressor" ref="a7014ea578f1bf870e8db3b7afeccf534" args="(void)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Async::AudioCompressor::~AudioCompressor </td>
          <td>(</td>
          <td class="paramtype">void&nbsp;</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Destructor. </p>

</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="aef62f704d4f3c108eec1ffec20006b8f"></a><!-- doxytag: member="Async::AudioCompressor::processSamples" ref="aef62f704d4f3c108eec1ffec20006b8f" args="(float *dest, const float *src, int count)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual void Async::AudioCompressor::processSamples </td>
          <td>(</td>
          <td class="paramtype">float *&nbsp;</td>
          <td class="paramname"> <em>dest</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const float *&nbsp;</td>
          <td class="paramname"> <em>src</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>count</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [protected, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Process incoming samples and put them into the output buffer. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>dest</em>&nbsp;</td><td>Destination buffer </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>src</em>&nbsp;</td><td>Source buffer </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>count</em>&nbsp;</td><td>Number of samples in the source buffer</td></tr>
  </table>
  </dd>
</dl>
<p>This function should be reimplemented by the inheriting class to do the actual processing of the incoming samples. All samples must be processed, otherwise they are lost and the output buffer will contain garbage. </p>

<p>Implements <a class="el" href="classAsync_1_1AudioProcessor.html#a2d7e4ec25a7bd6a9c5c20ae35c1adee3">Async::AudioProcessor</a>.</p>

</div>
</div>
<a class="anchor" id="a9365703d0c65c8de53c0a29785a05878"></a><!-- doxytag: member="Async::AudioCompressor::reset" ref="a9365703d0c65c8de53c0a29785a05878" args="(void)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Async::AudioCompressor::reset </td>
          <td>(</td>
          <td class="paramtype">void&nbsp;</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Reset the compressor. </p>

</div>
</div>
<a class="anchor" id="a98e17836146463254b295bacab75bfb7"></a><!-- doxytag: member="Async::AudioCompressor::setAttack" ref="a98e17836146463254b295bacab75bfb7" args="(double attack_ms)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Async::AudioCompressor::setAttack </td>
          <td>(</td>
          <td class="paramtype">double&nbsp;</td>
          <td class="paramname"> <em>attack_ms</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Set the compressor attack time. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>attack_ms</em>&nbsp;</td><td>The attack time in milliseconds </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="AsyncAudioCompressor_8h_source.html#l00201">201</a> of file <a class="el" href="AsyncAudioCompressor_8h_source.html">AsyncAudioCompressor.h</a>.</p>

<p>References <a class="el" href="AsyncAudioCompressor_8h_source.html#l00118">Async::EnvelopeDetector::setTc()</a>.</p>

</div>
</div>
<a class="anchor" id="a03ce211a5ec025391881a5c13b550fc2"></a><!-- doxytag: member="Async::AudioCompressor::setDecay" ref="a03ce211a5ec025391881a5c13b550fc2" args="(double decay_ms)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Async::AudioCompressor::setDecay </td>
          <td>(</td>
          <td class="paramtype">double&nbsp;</td>
          <td class="paramname"> <em>decay_ms</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Set the compressor decay time. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>decay_ms</em>&nbsp;</td><td>The decay time in milliseconds </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="AsyncAudioCompressor_8h_source.html#l00207">207</a> of file <a class="el" href="AsyncAudioCompressor_8h_source.html">AsyncAudioCompressor.h</a>.</p>

<p>References <a class="el" href="AsyncAudioCompressor_8h_source.html#l00118">Async::EnvelopeDetector::setTc()</a>.</p>

</div>
</div>
<a class="anchor" id="ae4c70c72b06a265b1e42174e29db9745"></a><!-- doxytag: member="Async::AudioCompressor::setOutputGain" ref="ae4c70c72b06a265b1e42174e29db9745" args="(float gain)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Async::AudioCompressor::setOutputGain </td>
          <td>(</td>
          <td class="paramtype">float&nbsp;</td>
          <td class="paramname"> <em>gain</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Set the output gain. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>gain</em>&nbsp;</td><td>The gain to set.</td></tr>
  </table>
  </dd>
</dl>
<p>The output gain is the amplification applied to the audio signal before it leaves the compressor. If gain &gt; 1 the signal is amplified. If gain &lt; 1 the signal is attenuated. </p>

</div>
</div>
<a class="anchor" id="a2a733dc6f08915c6c7daaf63b17133ef"></a><!-- doxytag: member="Async::AudioCompressor::setRatio" ref="a2a733dc6f08915c6c7daaf63b17133ef" args="(double ratio)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Async::AudioCompressor::setRatio </td>
          <td>(</td>
          <td class="paramtype">double&nbsp;</td>
          <td class="paramname"> <em>ratio</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Set the compression ratio. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>ratio</em>&nbsp;</td><td>The compression ratio (ex 0.1 == 10:1) </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="AsyncAudioCompressor_8h_source.html#l00195">195</a> of file <a class="el" href="AsyncAudioCompressor_8h_source.html">AsyncAudioCompressor.h</a>.</p>

</div>
</div>
<a class="anchor" id="aa2e5ed69261053a7f6a1ee8c9d8d69e9"></a><!-- doxytag: member="Async::AudioCompressor::setThreshold" ref="aa2e5ed69261053a7f6a1ee8c9d8d69e9" args="(double thresh_db)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Async::AudioCompressor::setThreshold </td>
          <td>(</td>
          <td class="paramtype">double&nbsp;</td>
          <td class="paramname"> <em>thresh_db</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Set the compression threshold. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>thresh_db</em>&nbsp;</td><td>The compression threshold in dB</td></tr>
  </table>
  </dd>
</dl>
<p>The threshold is the level, in dB, the signal must rise to before the compressor kicks in. </p>

<p>Definition at line <a class="el" href="AsyncAudioCompressor_8h_source.html#l00189">189</a> of file <a class="el" href="AsyncAudioCompressor_8h_source.html">AsyncAudioCompressor.h</a>.</p>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="AsyncAudioCompressor_8h_source.html">AsyncAudioCompressor.h</a></li>
</ul>
</div>
<hr class="footer"/><address style="text-align: right;"><small>Generated by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.2-20100208 </small></address>
</body>
</html>