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

📄 classaflibaudiomixer.html

📁 一个共享源码的音频库5(doc 文档)
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<!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>aflibAudioMixer 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>aflibAudioMixer  Class Reference</h1>Audio Mixing class. <a href="#_details">More...</a><p><code>#include &lt;<a class="el" href="aflibAudioMixer_8h-source.html">aflibAudioMixer.h</a>&gt;</code><p><p>Inheritance diagram for aflibAudioMixer:<p><center><img src="classaflibAudioMixer.png" usemap="#aflibAudioMixer_map" border="0"></center><map name="aflibAudioMixer_map"><area href="classaflibAudio.html" alt="aflibAudio" shape="rect" coords="81,56,233,80"><area href="classaflibChain.html" alt="aflibChain" shape="rect" coords="0,0,152,24"><area href="classaflibMemCache.html" alt="aflibMemCache" shape="rect" coords="162,0,314,24"><area href="classaflibAudioStereoToMono.html" alt="aflibAudioStereoToMono" shape="rect" coords="81,168,233,192"></map><a href="classaflibAudioMixer-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="classaflibAudioMixer.html#a0">aflibAudioMixer</a> (<a class="el" href="classaflibAudio.html">aflibAudio</a> &amp;audio)</td></tr><tr><td>&nbsp;</td><td><font size=-1><em>Constructor that requires a parent.</em> <a href="#a0">More...</a><em></em></font><br><br></td></tr><tr><td nowrap align=right valign=top>&nbsp;</td><td valign=bottom><a class="el" href="classaflibAudioMixer.html#a1">aflibAudioMixer</a> ()</td></tr><tr><td>&nbsp;</td><td><font size=-1><em>Constructor that does not require a parent.</em> <a href="#a1">More...</a><em></em></font><br><br></td></tr><tr><td nowrap align=right valign=top>&nbsp;</td><td valign=bottom><a class="el" href="classaflibAudioMixer.html#a2">~aflibAudioMixer</a> ()</td></tr><tr><td>&nbsp;</td><td><font size=-1><em>Destructor.</em> <a href="#a2">More...</a><em></em></font><br><br></td></tr><tr><td nowrap align=right valign=top><a class="el" href="aflib_8h.html#a33">aflibStatus</a>&nbsp;</td><td valign=bottom><a class="el" href="classaflibAudioMixer.html#a3">addMix</a> (int input, int in_chan, int out_chan, int amp)</td></tr><tr><td>&nbsp;</td><td><font size=-1><em>Adds a mix element.</em> <a href="#a3">More...</a><em></em></font><br><br></td></tr><tr><td nowrap align=right valign=top><a class="el" href="aflib_8h.html#a33">aflibStatus</a>&nbsp;</td><td valign=bottom><a class="el" href="classaflibAudioMixer.html#a4">delMix</a> (int input, int in_chan, int out_chan)</td></tr><tr><td>&nbsp;</td><td><font size=-1><em>Deletes a mix element.</em> <a href="#a4">More...</a><em></em></font><br><br></td></tr><tr><td nowrap align=right valign=top>void&nbsp;</td><td valign=bottom><a class="el" href="classaflibAudioMixer.html#a5">delAllMix</a> ()</td></tr><tr><td>&nbsp;</td><td><font size=-1><em>Deletes all mix elements.</em> <a href="#a5">More...</a><em></em></font><br><br></td></tr><tr><td nowrap align=right valign=top>int&nbsp;</td><td valign=bottom><a class="el" href="classaflibAudioMixer.html#a6">getNumOfMixs</a> ()</td></tr><tr><td>&nbsp;</td><td><font size=-1><em>Returns the current number of active mix elements.</em> <a href="#a6">More...</a><em></em></font><br><br></td></tr><tr><td nowrap align=right valign=top><a class="el" href="aflib_8h.html#a33">aflibStatus</a>&nbsp;</td><td valign=bottom><a class="el" href="classaflibAudioMixer.html#a7">getMix</a> (int mix_num, int &amp;input, int &amp;in_chan, int &amp;out_chan, int &amp;amp)</td></tr><tr><td>&nbsp;</td><td><font size=-1><em>Returns information on a specific mix element.</em> <a href="#a7">More...</a><em></em></font><br><br></td></tr><tr><td nowrap align=right valign=top>void&nbsp;</td><td valign=bottom><a class="el" href="classaflibAudioMixer.html#a8">setInputConfig</a> (const <a class="el" href="classaflibConfig.html">aflibConfig</a> &amp;cfg)</td></tr><tr><td>&nbsp;</td><td><font size=-1><em>Sets the input audio data configuration of an object.</em> <a href="#a8">More...</a><em></em></font><br><br></td></tr><tr><td nowrap align=right valign=top><a class="el" href="aflib_8h.html#a33">aflibStatus</a>&nbsp;</td><td valign=bottom><a class="el" href="classaflibAudioMixer.html#a9">compute_segment</a> (list&lt; <a class="el" href="classaflibData.html">aflibData</a> * &gt; &amp;data, long long position=-1)</td></tr><tr><td>&nbsp;</td><td><font size=-1><em>Work function, must be implemented by derived class.</em> <a href="#a9">More...</a><em></em></font><br><br></td></tr><tr><td nowrap align=right valign=top>const char *&nbsp;</td><td valign=bottom><a class="el" href="classaflibAudioMixer.html#a10">getName</a> () const</td></tr><tr><td>&nbsp;</td><td><font size=-1><em>Returns the name of the derived class.</em> <a href="#a10">More...</a><em></em></font><br><br></td></tr><tr><td nowrap align=right valign=top>bool&nbsp;</td><td valign=bottom><a class="el" href="classaflibAudioMixer.html#a11">isDataSizeSupported</a> (<a class="el" href="aflib_8h.html#a30">aflib_data_size</a> size)</td></tr><tr><td nowrap align=right valign=top>bool&nbsp;</td><td valign=bottom><a class="el" href="classaflibAudioMixer.html#a12">isEndianSupported</a> (<a class="el" href="aflib_8h.html#a31">aflib_data_endian</a> end)</td></tr><tr><td nowrap align=right valign=top>bool&nbsp;</td><td valign=bottom><a class="el" href="classaflibAudioMixer.html#a13">isSampleRateSupported</a> (int &amp;rate)</td></tr></table><hr><a name="_details"></a><h2>Detailed Description</h2>Audio Mixing class.<p>This class provides for mixing 1 or more inputs together to a single output.<p>It is derived from <a class="el" href="classaflibAudio.html">aflibAudio</a> and thus can be used in a chain. It will mix any  number of channels, inputs to one output. The output can have multiple  channels. It will also allow one to adjust the amplitude of each input. This  class will force each input to have the same characteristics such as sample  rate, data size and endian. If they are not then it will rely on the <a class="el" href="classaflibAudio.html">aflibAudio</a> chain to automatically convert the data. The sample rate will be converted to  the highest value for all inputs. The data size will also be converted to the  largest size amoungst the inputs. The output will then be this selection of  values. The mixing is performed by mapping inputs to outputs. This is done with the addMix function. Additional parents can be added by using the addParent  call in the <a class="el" href="classaflibChain.html">aflibChain</a> base class. The ID returned from this call should be  used for the addMix call. The parent passed in the constructor has an ID of 1.  If a parent is removed then all mixes that reference this input will be  removed. <p><hr><h2>Constructor &amp; Destructor Documentation</h2><a name="a0" doxytag="aflibAudioMixer::aflibAudioMixer"></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"> aflibAudioMixer::aflibAudioMixer </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top"><a class="el" href="classaflibAudio.html">aflibAudio</a> &amp;&nbsp;</td>          <td class="mdname1" valign="top" nowrap>&nbsp; <em>audio</em>          </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>Constructor that requires a parent.<p>    </td>  </tr></table><a name="a1" doxytag="aflibAudioMixer::aflibAudioMixer"></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"> aflibAudioMixer::aflibAudioMixer </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>Constructor that does not require a parent.<p>    </td>  </tr></table><a name="a2" doxytag="aflibAudioMixer::~aflibAudioMixer"></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"> aflibAudioMixer::~aflibAudioMixer </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>Destructor.<p>    </td>  </tr></table><hr><h2>Member Function Documentation</h2><a name="a3" doxytag="aflibAudioMixer::addMix"></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="aflib_8h.html#a33">aflibStatus</a> aflibAudioMixer::addMix </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">int&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>input</em>, </td>        </tr>        <tr>          <td></td>          <td></td>          <td class="md" nowrap>int&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>in_chan</em>, </td>        </tr>        <tr>          <td></td>          <td></td>          <td class="md" nowrap>int&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>out_chan</em>, </td>        </tr>        <tr>          <td></td>          <td></td>          <td class="md" nowrap>int&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>amp</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>Adds a mix element.<p>This will add an element to be mixed. Any input specified must exist.<p>If an input was passed to the aflibAudioMixer constructor then that input is number 1. Use the return value from addParent there on.<p>The amplitude can be specified as any value between 1 and 100. This  corresponds to 1 and 100 percent of full scale.<p>The in_chan is the channel number of the input to use. The out_chan is the  same but indicates the output channel to use. The first channel for inputs  and outputs start at 0. For example to mix a stereo input to a mono output  one would call addMix twice with (1, 0, 0, 100) &amp; (1, 1, 0, 100). This would take channels 0 and 1 of input 1, and output both to channel 0.<p>If inputs differ in their configuration then the output configuration will  be the greater of eachs configs. See the documentation for setInputConfig for exactly how this is done.<p>If the mix was added successfully then AFLIB_SUCCESS will be returned. A mix with same input, in_chan, out_chan values will replace the old values.     </td>  </tr></table><a name="a9" doxytag="aflibAudioMixer::compute_segment"></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="aflib_8h.html#a33">aflibStatus</a> aflibAudioMixer::compute_segment </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">list&lt; <a class="el" href="classaflibData.html">aflibData</a> * &gt; &amp;&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>data</em>, </td>        </tr>        <tr>          <td></td>          <td></td>          <td class="md" nowrap>long long&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>position</em> = -1</td>        </tr>        <tr>          <td></td>          <td class="md">)&nbsp;</td>          <td class="md" colspan="2"><code> [virtual]</code></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>Work function, must be implemented by derived class.<p><p>Reimplemented from <a class="el" href="classaflibAudio.html#a12">aflibAudio</a>.    </td>  </tr></table><a name="a5" doxytag="aflibAudioMixer::delAllMix"></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 aflibAudioMixer::delAllMix </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>Deletes all mix elements.<p>This will delele all current mix elements.     </td>  </tr></table><a name="a4" doxytag="aflibAudioMixer::delMix"></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="aflib_8h.html#a33">aflibStatus</a> aflibAudioMixer::delMix </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">int&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>input</em>, </td>

⌨️ 快捷键说明

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