aflibaudiospectrum_8h-source.html
来自「一个共享源码的音频库5(doc 文档)」· HTML 代码 · 共 121 行
HTML
121 行
<!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>aflibAudioSpectrum.h Source File</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> <a class="qindex" href="hierarchy.html">Class Hierarchy</a> <a class="qindex" href="annotated.html">Compound List</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="functions.html">Compound Members</a> <a class="qindex" href="globals.html">File Members</a> </center><hr><h1>aflibAudioSpectrum.h</h1><a href="aflibAudioSpectrum_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre>00001 <font class="comment">/*</font>00002 <font class="comment"> * Copyright: (C) 1999-2001 Bruce W. Forsberg</font>00003 <font class="comment"> *</font>00004 <font class="comment"> * This library is free software; you can redistribute it and/or</font>00005 <font class="comment"> * modify it under the terms of the GNU Lesser General Public</font>00006 <font class="comment"> * License as published by the Free Software Foundation; either</font>00007 <font class="comment"> * version 2.1 of the License, or any later version.</font>00008 <font class="comment"> *</font>00009 <font class="comment"> * This library is distributed in the hope that it will be useful,</font>00010 <font class="comment"> * but WITHOUT ANY WARRANTY; without even the implied warranty of</font>00011 <font class="comment"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU</font>00012 <font class="comment"> * Lesser General Public License for more details.</font>00013 <font class="comment"> *</font>00014 <font class="comment"> * You should have received a copy of the GNU Lesser General Public</font>00015 <font class="comment"> * License along with this library; if not, write to the Free Software</font>00016 <font class="comment"> * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA</font>00017 <font class="comment"> *</font>00018 <font class="comment"> * Bruce Forsberg forsberg@tns.net</font>00019 <font class="comment"> *</font>00020 <font class="comment"> */</font>00021 00022 00023 <font class="preprocessor">#ifndef _AFLIBAUDIOSPECTRUM_H_</font>00024 <font class="preprocessor"></font><font class="preprocessor">#define _AFLIBAUDIOSPECTRUM_H_</font>00025 <font class="preprocessor"></font>00026 <font class="preprocessor">#ifdef HAVE_CONFIG_H</font>00027 <font class="preprocessor"></font><font class="preprocessor">#include <config.h></font>00028 <font class="preprocessor">#endif</font>00029 <font class="preprocessor"></font>00030 <font class="preprocessor">#include "<a class="code" href="aflibAudio_8h.html">aflibAudio.h</a>"</font>00031 <font class="preprocessor">#include "<a class="code" href="aflibFFT_8h.html">aflibFFT.h</a>"</font>00032 <a name="l00033"></a><a class="code" href="aflibAudioSpectrum_8h.html#a0">00033</a> <font class="preprocessor">#define MAX_ARRAY_SIZE 1024</font>00034 <font class="preprocessor"></font><a name="l00035"></a><a class="code" href="aflibAudioSpectrum_8h.html#a1">00035</a> <font class="keyword">typedef</font> void (*<a class="code" href="aflibAudioSpectrum_8h.html#a1">powermeter_callback</a>)(<font class="keywordtype">double</font> *);<a name="l00036"></a><a class="code" href="aflibAudioSpectrum_8h.html#a2">00036</a> <font class="keyword">typedef</font> void (*<a class="code" href="aflibAudioSpectrum_8h.html#a2">spectrum_callback</a>)(<font class="keywordtype">int</font>, <font class="keywordtype">double</font> *);00037 00048 <font class="keyword">class </font><a class="code" href="classaflibAudioSpectrum.html">aflibAudioSpectrum</a> : <font class="keyword">public</font> <a class="code" href="classaflibAudio.html">aflibAudio</a> {00049 00050 <font class="keyword">public</font>:00051 00052 <font class="comment">// Available contructors and destructors</font>00053 <a class="code" href="classaflibAudioSpectrum.html#a0">aflibAudioSpectrum</a>(<a class="code" href="classaflibAudio.html">aflibAudio</a>& audio);00054 <a class="code" href="classaflibAudioSpectrum.html#a1">~aflibAudioSpectrum</a>();00055 00056 <font class="keywordtype">bool</font>00057 <a class="code" href="classaflibAudioSpectrum.html#a2">setParameters</a>(00058 <font class="keywordtype">int</font> num_samples,00059 <font class="keywordtype">int</font> resp_per_sec,00060 <font class="keywordtype">int</font> channels);00061 00062 <font class="keywordtype">void</font>00063 <a class="code" href="classaflibAudioSpectrum.html#a3">setPowerMeterCallback</a>( <a class="code" href="aflibAudioSpectrum_8h.html#a1">powermeter_callback</a> func_ptr);00064 00065 <font class="keywordtype">void</font>00066 <a class="code" href="classaflibAudioSpectrum.html#a4">setAudioSpectrumCallback</a>( <a class="code" href="aflibAudioSpectrum_8h.html#a2">spectrum_callback</a> func_ptr);00067 00068 <font class="keywordtype">void</font>00069 <a class="code" href="classaflibAudioSpectrum.html#a5">setInputConfig</a>(<font class="keyword">const</font> <a class="code" href="classaflibConfig.html">aflibConfig</a>& cfg);00070 00071 <a class="code" href="aflib_8h.html#a33">aflibStatus</a>00072 <a class="code" href="classaflibAudioSpectrum.html#a6">compute_segment</a>(00073 list<aflibData *>& data,00074 <font class="keywordtype">long</font> <font class="keywordtype">long</font> position = -1) ;00075 00077 <font class="keyword">const</font> <font class="keywordtype">char</font> *<a name="l00078"></a><a class="code" href="classaflibAudioSpectrum.html#a7">00078</a> <a class="code" href="classaflibAudioSpectrum.html#a7">getName</a>()<font class="keyword"> const </font>{ <font class="keywordflow">return</font> <font class="stringliteral">"aflibAudioSpectrum"</font>;};00079 00080 <font class="keyword">protected</font>:00081 00082 <font class="keyword">virtual</font> <font class="keywordtype">void</font>00083 <a class="code" href="classaflibAudioSpectrum.html#b0">setPowerMeter</a>(<font class="keywordtype">double</font>*);00084 00085 <font class="keyword">virtual</font> <font class="keywordtype">void</font>00086 <a class="code" href="classaflibAudioSpectrum.html#b1">setAudioSpectrum</a>(<font class="keywordtype">int</font>, <font class="keywordtype">double</font>*);00087 <a name="l00088"></a><a class="code" href="classaflibAudioSpectrum.html#n0">00088</a> <font class="keywordtype">bool</font> <a class="code" href="classaflibAudioSpectrum.html#n0">_pm</a>;<a name="l00089"></a><a class="code" href="classaflibAudioSpectrum.html#n1">00089</a> <font class="keywordtype">bool</font> <a class="code" href="classaflibAudioSpectrum.html#n1">_spectrum</a>;00090 <font class="keyword">private</font>:00091 00092 <a class="code" href="classaflibAudioSpectrum.html#a0">aflibAudioSpectrum</a>();00093 00094 <a class="code" href="classaflibAudioSpectrum.html#a0">aflibAudioSpectrum</a>(<font class="keyword">const</font> <a class="code" href="classaflibAudioSpectrum.html">aflibAudioSpectrum</a>& op);00095 00096 <font class="keyword">const</font> <a class="code" href="classaflibAudioSpectrum.html">aflibAudioSpectrum</a>&00097 operator=(<font class="keyword">const</font> <a class="code" href="classaflibAudioSpectrum.html">aflibAudioSpectrum</a>& op);00098 00099 <font class="keywordtype">void</font>00100 allocateMemory();00101 00102 <a class="code" href="classaflibFFT.html">aflibFFT</a> _fft;00103 <font class="keywordtype">int</font> _num_samples;00104 <font class="keywordtype">int</font> _responses;00105 <font class="keywordtype">int</font> _channels;00106 <font class="keywordtype">int</font> _samples_between_responses;00107 <font class="keywordtype">int</font> _samples_counter;00108 <font class="keywordtype">double</font> * _in_real;00109 <font class="keywordtype">double</font> * _power_out;00110 <font class="keywordtype">double</font> * _spec_out;00111 <a class="code" href="aflibAudioSpectrum_8h.html#a1">powermeter_callback</a> _pm_func_ptr;00112 <a class="code" href="aflibAudioSpectrum_8h.html#a2">spectrum_callback</a> _spectrum_func_ptr;00113 00114 };00115 00116 00117 <font class="preprocessor">#endif</font></pre></div><hr><address align="right"><small>Generated on Wed May 8 20:51:05 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 + -
显示快捷键?