⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 classaflibconverter.html

📁 一个共享源码的音频库5(doc 文档)
💻 HTML
字号:
<!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>aflibConverter class Reference</title><link href="doxygen.css" rel="stylesheet" type="text/css"></head><body><!-- Generated by Doxygen 1.2.15 --><center><a class="qindex" href="index.html">Main Page</a> &nbsp; <a class="qindex" href="hierarchy.html">Class Hierarchy</a> &nbsp; <a class="qindex" href="annotated.html">Compound List</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="functions.html">Compound Members</a> &nbsp; <a class="qindex" href="globals.html">File Members</a> &nbsp; </center><hr><h1>aflibConverter  Class Reference</h1>Provides sample rate conversion. <a href="#_details">More...</a><p><code>#include &lt;<a class="el" href="aflibConverter_8h-source.html">aflibConverter.h</a>&gt;</code><p><a href="classaflibConverter-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0><tr><td colspan=2><br><h2>Public Methods</h2></td></tr><tr><td nowrap align=right valign=top>&nbsp;</td><td valign=bottom><a class="el" href="classaflibConverter.html#a0">aflibConverter</a> (bool high_quality, bool linear_interpolation, bool filter_interpolation)</td></tr><tr><td nowrap align=right valign=top>&nbsp;</td><td valign=bottom><a class="el" href="classaflibConverter.html#a1">~aflibConverter</a> ()</td></tr><tr><td nowrap align=right valign=top>void&nbsp;</td><td valign=bottom><a class="el" href="classaflibConverter.html#a2">initialize</a> (double factor, int channels, double volume=1.0)</td></tr><tr><td nowrap align=right valign=top>int&nbsp;</td><td valign=bottom><a class="el" href="classaflibConverter.html#a3">resample</a> (int &amp;inCount, int outCount, short inArray[], short outArray[])</td></tr></table><hr><a name="_details"></a><h2>Detailed Description</h2>Provides sample rate conversion.<p>This class will perform audio resampling. With the constructor you can choose the type of resampling to be done. Simple linear interpolation can be done by setting linear_interpolation to be TRUE in the constructor. The other two flags are  ignored if this is set. If linear_interpolation is FALSE then some form of filtering will be done. IF high_quality is FALSE then a small filter will be performed.  If high_quality is TRUE then a large filter (higher quality) will be performed. For both the small and large filters another parameter can be specified, filter_interpolation. With filter_interpolation set then the filter coefficients used for both the small and large filtering will be interpolated as well.<p>This class was designed to stream audio data. It also expects audio data as 16 bit values. Each time a new stream is started some initialization needs to be done. Thus the function initialize should be called to initialize everything. This initialize function will set the conversion factor as well as a multiplecation factor for volume. The volume only applies to the small and large filter. Since this filter uses a history of the audio data it is possible for it to vary in amplitude. This allows users to scale the data. This class will work on any number of channels. Once everything is specified then resample should be called as many times as is necessary to process all the data. The value inCount will be returned indicating how many inArray samples were actually used to produce the output. This value can be used to indicate where the next block of inArray data should start. The resample function is driven by the outCount value specified. The inArray should contain at least: outCount / factor + extra_samples. extra_samples depends on the type of filtering done. As a rule of thumb 50 should be adequate for any type of filter. <p><hr><h2>Constructor &amp; Destructor Documentation</h2><a name="a0" doxytag="aflibConverter::aflibConverter"></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"> aflibConverter::aflibConverter </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">bool&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>high_quality</em>, </td>        </tr>        <tr>          <td></td>          <td></td>          <td class="md" nowrap>bool&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>linear_interpolation</em>, </td>        </tr>        <tr>          <td></td>          <td></td>          <td class="md" nowrap>bool&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>filter_interpolation</em></td>        </tr>        <tr>          <td></td>          <td class="md">)&nbsp;</td>          <td class="md" colspan="2"></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>    </td>  </tr></table><a name="a1" doxytag="aflibConverter::~aflibConverter"></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"> aflibConverter::~aflibConverter </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="mdname1" valign="top" nowrap>&nbsp;          </td>          <td class="md" valign="top">)&nbsp;</td>          <td class="md" nowrap></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>    </td>  </tr></table><hr><h2>Member Function Documentation</h2><a name="a2" doxytag="aflibConverter::initialize"></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"> void aflibConverter::initialize </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">double&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>factor</em>, </td>        </tr>        <tr>          <td></td>          <td></td>          <td class="md" nowrap>int&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>channels</em>, </td>        </tr>        <tr>          <td></td>          <td></td>          <td class="md" nowrap>double&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>volume</em> = 1.0</td>        </tr>        <tr>          <td></td>          <td class="md">)&nbsp;</td>          <td class="md" colspan="2"></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>    </td>  </tr></table><a name="a3" doxytag="aflibConverter::resample"></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 aflibConverter::resample </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">int &amp;&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>inCount</em>, </td>        </tr>        <tr>          <td></td>          <td></td>          <td class="md" nowrap>int&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>outCount</em>, </td>        </tr>        <tr>          <td></td>          <td></td>          <td class="md" nowrap>short&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>inArray</em>[], </td>        </tr>        <tr>          <td></td>          <td></td>          <td class="md" nowrap>short&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>outArray</em>[]</td>        </tr>        <tr>          <td></td>          <td class="md">)&nbsp;</td>          <td class="md" colspan="2"></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>    </td>  </tr></table><hr>The documentation for this class was generated from the following files:<ul><li><a class="el" href="aflibConverter_8h-source.html">aflibConverter.h</a><li><a class="el" href="aflibConverter_8cc.html">aflibConverter.cc</a><li><a class="el" href="aflibConverterLargeFilter_8h-source.html">aflibConverterLargeFilter.h</a><li><a class="el" href="aflibConverterSmallFilter_8h-source.html">aflibConverterSmallFilter.h</a></ul><hr><address align="right"><small>Generated on Wed May 8 20:51:11 2002 for Open Source Audio Library Project 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.15 </small></address></body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -