classaflibaudiospectrum.html

来自「一个共享源码的音频库5(doc 文档)」· HTML 代码 · 共 449 行 · 第 1/2 页

HTML
449
字号
<a name="a4" doxytag="aflibAudioSpectrum::setAudioSpectrumCallback"></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 aflibAudioSpectrum::setAudioSpectrumCallback </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top"><a class="el" href="aflibAudioSpectrum_8h.html#a2">spectrum_callback</a>&nbsp;</td>          <td class="mdname1" valign="top" nowrap>&nbsp; <em>func_ptr</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>Enables and disables audio spectrum callback.<p>This function allows one to register a callback that will get called whenever there is data processed showing what the audio spectrum is. It will be called based on the responses per second that was set in the setParamters call. The user must register a function that receives an int and a double array: func(int array_size, *double array); The first value passed will be the size of the array passed. Users should not read beyond this size. The array values passed will be in decibels. When func is called users should copy the data if they wish to save it as the memory will go out of scope when func is exitted. In order to turn off the callback pass NULL to this function.     </td>  </tr></table><a name="a5" doxytag="aflibAudioSpectrum::setInputConfig"></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 aflibAudioSpectrum::setInputConfig </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">const <a class="el" href="classaflibConfig.html">aflibConfig</a> &amp;&nbsp;</td>          <td class="mdname1" valign="top" nowrap>&nbsp; <em>cfg</em>          </td>          <td class="md" valign="top">)&nbsp;</td>          <td class="md" nowrap><code> [virtual]</code></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>Sets the input audio data configuration of an object.<p>This is a virtual function that derived classes can override if needed. It allows the caller to set the configuration of the audio data of an object. By default it saves the output audio configuration to be the same as the input data configuration that is passed in. This should be sufficient for most derived classes. For those classes that will have a change from the output to input config mapping then this function should be overriden and the output config processed and saved. <p>Reimplemented from <a class="el" href="classaflibAudio.html#a7">aflibAudio</a>.    </td>  </tr></table><a name="a2" doxytag="aflibAudioSpectrum::setParameters"></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"> bool aflibAudioSpectrum::setParameters </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">int&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>num_samples</em>, </td>        </tr>        <tr>          <td></td>          <td></td>          <td class="md" nowrap>int&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>resp_per_sec</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 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>Sets parameters for the audio spectrum class.<p>This allows the user to set the number of samples to be returned for the spectrum callback. It also determines the size of the fft that is done for both the spectrum and power meter callbacks. The number of samples must be a power of 2 upto 512. Another words, valid values are: 2, 4, 8, 16, 32, 64, 128, 256, 512. It also allows the user to set the number of times the callback functions will get called a second. There are limits to how large this value can be. It also depends on the sample rate of the audio stream. Good values would be 10 or less. If an invalid number of samples is set then FALSE will be returned.     </td>  </tr></table><a name="b0" doxytag="aflibAudioSpectrum::setPowerMeter"></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 aflibAudioSpectrum::setPowerMeter </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">double *&nbsp;</td>          <td class="mdname1" valign="top" nowrap>&nbsp;          </td>          <td class="md" valign="top">)&nbsp;</td>          <td class="md" nowrap><code> [protected, virtual]</code></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="aflibAudioSpectrum::setPowerMeterCallback"></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 aflibAudioSpectrum::setPowerMeterCallback </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top"><a class="el" href="aflibAudioSpectrum_8h.html#a1">powermeter_callback</a>&nbsp;</td>          <td class="mdname1" valign="top" nowrap>&nbsp; <em>func_ptr</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>Enables and disables power meter callback.<p>This function allows one to register a callback that will get called whenever there is data processed showing what the power is. It will be called based on the responses per second that was set in the setParamters call. The user must register a function that receives a double: func(double val); The value passed will be in decibels. In order to turn off the callback pass NULL to this function.     </td>  </tr></table><hr><h2>Member Data Documentation</h2><a name="n0" doxytag="aflibAudioSpectrum::_pm"></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"> bool aflibAudioSpectrum::_pm<code> [protected]</code>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>    </td>  </tr></table><a name="n1" doxytag="aflibAudioSpectrum::_spectrum"></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"> bool aflibAudioSpectrum::_spectrum<code> [protected]</code>      </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="aflibAudioSpectrum_8h-source.html">aflibAudioSpectrum.h</a><li><a class="el" href="aflibAudioSpectrum_8cc.html">aflibAudioSpectrum.cc</a></ul><hr><address align="right"><small>Generated on Wed May 8 20:51:10 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 + =
减小字号Ctrl + -
显示快捷键?