1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233
|
<!-- This comment will put IE 6, 7 and 8 in quirks mode -->
<!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>libaudiomask: depukfb.H Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javaScript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body onload='searchBox.OnSelectItem(0);'>
<!-- Generated by Doxygen 1.6.3 -->
<script type="text/javascript"><!--
var searchBox = new SearchBox("searchBox", "search",false,'Search');
--></script>
<div class="navigation" id="top">
<div class="tabs">
<ul>
<li><a href="index.html"><span>Main Page</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
<li><a href="examples.html"><span>Examples</span></a></li>
<li>
<div id="MSearchBox" class="MSearchBoxInactive">
<img id="MSearchSelect" src="search/search.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</div>
</li>
</ul>
</div>
<div class="tabs">
<ul>
<li><a href="files.html"><span>File List</span></a></li>
</ul>
</div>
<h1>depukfb.H</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="preprocessor">#ifndef DEPUKFB_H_</span>
<a name="l00002"></a>00002 <span class="preprocessor"></span><span class="preprocessor">#define DEPUKFB_H_</span>
<a name="l00003"></a>00003 <span class="preprocessor"></span>
<a name="l00004"></a>00004 <span class="preprocessor">#include <fstream></span>
<a name="l00005"></a>00005
<a name="l00006"></a>00006 <span class="preprocessor">#include <iostream></span>
<a name="l00007"></a>00007 <span class="preprocessor">#include <math.h></span>
<a name="l00008"></a>00008 <span class="comment">//#include "../utils/perceptual.H"</span>
<a name="l00009"></a>00009 <span class="preprocessor">#include <stdlib.h></span>
<a name="l00010"></a>00010
<a name="l00011"></a>00011 <span class="preprocessor">#define FREQBINCOUNT 44100</span>
<a name="l00012"></a>00012 <span class="preprocessor"></span>
<a name="l00013"></a>00013 <span class="comment">//Filter bank central frequencies will be placed between this frequency fs/2</span>
<a name="l00014"></a>00014 <span class="preprocessor">#define LOWFREQ 50</span>
<a name="l00015"></a>00015 <span class="preprocessor"></span>
<a name="l00016"></a>00016 <span class="preprocessor">#define C1 24.673</span>
<a name="l00017"></a>00017 <span class="preprocessor"></span><span class="preprocessor">#define C2 4.368</span>
<a name="l00018"></a>00018 <span class="preprocessor"></span><span class="preprocessor">#define C3 21.366</span>
<a name="l00019"></a>00019 <span class="preprocessor"></span>
<a name="l00020"></a>00020 <span class="comment">//We are using a level invariant filterbank Hence define X as static</span>
<a name="l00021"></a>00021 <span class="preprocessor">#define X 51.0</span>
<a name="l00022"></a>00022 <span class="preprocessor"></span>
<a name="l00029"></a><a class="code" href="classDepUKFB.html">00029</a> <span class="keyword">class </span><a class="code" href="classDepUKFB.html">DepUKFB</a>{
<a name="l00030"></a>00030 <span class="keyword">static</span> <span class="keywordtype">double</span> p_51_1k;
<a name="l00031"></a>00031 <span class="keywordtype">int</span> fCount;
<a name="l00032"></a>00032
<a name="l00037"></a>00037 <span class="keywordtype">double</span> erb(<span class="keywordtype">double</span> fc){
<a name="l00038"></a>00038 <span class="keywordflow">return</span> 24.7*(4.37*(fc/1000.0)+1.0);
<a name="l00039"></a>00039 }
<a name="l00040"></a>00040
<a name="l00045"></a>00045 <span class="keywordtype">double</span> freq2ERB(<span class="keywordtype">double</span> freq){
<a name="l00046"></a>00046 <span class="keywordflow">return</span> (C3*log10((C2 * freq/1000.0) + 1.0));
<a name="l00047"></a>00047 }
<a name="l00052"></a>00052 <span class="keywordtype">double</span> ERB2freq(<span class="keywordtype">double</span> erb){
<a name="l00053"></a>00053 <span class="keywordflow">return</span> 1000.0 * (pow(10.0,(erb/C3)) - 1.0) / C2;
<a name="l00054"></a>00054 }
<a name="l00055"></a>00055
<a name="l00061"></a>00061 <span class="keyword">virtual</span> <span class="keywordtype">void</span> af(<span class="keywordtype">double</span> fc, <span class="keywordtype">int</span> whichFilter){
<a name="l00062"></a>00062 <span class="comment">// std::cout<<"DepUKFB::af"<<std::endl;</span>
<a name="l00063"></a>00063 <span class="keywordtype">double</span> freqFact=((double)<a class="code" href="classDepUKFB.html#a13cbfe921394b68c53a17878367566a9" title="The sample frequency.">fs</a>/2.0)/(double)FREQBINCOUNT;
<a name="l00064"></a>00064 <span class="comment">// std::cout<<freqFact<<'\t';</span>
<a name="l00065"></a>00065 <span class="keywordtype">double</span> freq=0.0;
<a name="l00066"></a>00066 <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i=0;i<FREQBINCOUNT;i++){
<a name="l00067"></a>00067 <a class="code" href="classDepUKFB.html#a2a50ed00bdba4a02376f568e9012906c" title="g coeff.">g</a>[i]=fabs((freq-fc)/fc);
<a name="l00068"></a>00068 freq+=freqFact;
<a name="l00069"></a>00069 }
<a name="l00070"></a>00070
<a name="l00071"></a>00071 <span class="keywordtype">double</span> *filt=<a class="code" href="classDepUKFB.html#adefe805565fa01861468b5a51ca87a89" title="The filters.">w</a>[whichFilter], p;
<a name="l00072"></a>00072 freq=0.0;
<a name="l00073"></a>00073
<a name="l00074"></a>00074 <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i=0;i<FREQBINCOUNT;i++){
<a name="l00075"></a>00075 <span class="keywordflow">if</span> (freq<fc)
<a name="l00076"></a>00076 p=<a class="code" href="classDepUKFB.html#add2cdb1268800eade95915f209e09166">p_l</a>(fc);
<a name="l00077"></a>00077 <span class="keywordflow">else</span>
<a name="l00078"></a>00078 p=<a class="code" href="classDepUKFB.html#ac9c9ed1ccc3a941359ff1d5d8c243c65">p_u</a>(fc);
<a name="l00079"></a>00079 filt[i]=(1.0+p*<a class="code" href="classDepUKFB.html#a2a50ed00bdba4a02376f568e9012906c" title="g coeff.">g</a>[i])*exp(-p*<a class="code" href="classDepUKFB.html#a2a50ed00bdba4a02376f568e9012906c" title="g coeff.">g</a>[i]);
<a name="l00080"></a>00080 freq+=freqFact;
<a name="l00081"></a>00081 }
<a name="l00082"></a>00082 }
<a name="l00083"></a>00083
<a name="l00084"></a>00084
<a name="l00088"></a>00088 <span class="keywordtype">void</span> findCF(<span class="keywordtype">void</span>){
<a name="l00089"></a>00089 <span class="keywordtype">double</span> step=(freq2ERB((<span class="keywordtype">double</span>)<a class="code" href="classDepUKFB.html#a13cbfe921394b68c53a17878367566a9" title="The sample frequency.">fs</a>/2.0-1.0)-freq2ERB(LOWFREQ))/(fCount-1.0);
<a name="l00090"></a>00090 <span class="comment">//std::cout<<"step "<<step<<std::endl;</span>
<a name="l00091"></a>00091 <span class="keywordtype">double</span> erbval=freq2ERB(LOWFREQ)-step;
<a name="l00092"></a>00092 <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i=0;i<fCount;i++){
<a name="l00093"></a>00093 <a class="code" href="classDepUKFB.html#ad0783de52b1d2ab777484d344e566514" title="The filter centre frequencies.">cf</a>[i]=ERB2freq(erbval+=step); <span class="comment">//centre frequency locations</span>
<a name="l00094"></a>00094 <span class="comment">//std::cout<<cf[i]<<std::endl;</span>
<a name="l00095"></a>00095 }
<a name="l00096"></a>00096
<a name="l00097"></a>00097 erbval=freq2ERB(LOWFREQ)-step/2.0;
<a name="l00098"></a>00098 <a class="code" href="classDepUKFB.html#aa995091f157e795c2ef67277594c8431" title="The filter edge frequencies.">ef</a>[0]=0.0;
<a name="l00099"></a>00099 <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i=1;i<fCount;i++){
<a name="l00100"></a>00100 <a class="code" href="classDepUKFB.html#aa995091f157e795c2ef67277594c8431" title="The filter edge frequencies.">ef</a>[i]=ERB2freq(erbval+=step); <span class="comment">//edge frequency locations</span>
<a name="l00101"></a>00101 <span class="comment">//std::cout<<cf[i]<<'\t'<<ef[i]<<std::endl;</span>
<a name="l00102"></a>00102 }
<a name="l00103"></a>00103 }
<a name="l00104"></a>00104 <span class="keyword">protected</span>:
<a name="l00105"></a><a class="code" href="classDepUKFB.html#a13cbfe921394b68c53a17878367566a9">00105</a> <span class="keywordtype">int</span> <a class="code" href="classDepUKFB.html#a13cbfe921394b68c53a17878367566a9" title="The sample frequency.">fs</a>;
<a name="l00106"></a><a class="code" href="classDepUKFB.html#a2a50ed00bdba4a02376f568e9012906c">00106</a> <span class="keywordtype">double</span> *<a class="code" href="classDepUKFB.html#a2a50ed00bdba4a02376f568e9012906c" title="g coeff.">g</a>;
<a name="l00107"></a><a class="code" href="classDepUKFB.html#adefe805565fa01861468b5a51ca87a89">00107</a> <span class="keywordtype">double</span> **<a class="code" href="classDepUKFB.html#adefe805565fa01861468b5a51ca87a89" title="The filters.">w</a>;
<a name="l00108"></a>00108
<a name="l00109"></a><a class="code" href="classDepUKFB.html#ad08c4284678b86df790942023a5703ef">00109</a> <a class="code" href="classDepUKFB.html#ad08c4284678b86df790942023a5703ef">DepUKFB</a>(){
<a name="l00110"></a>00110 }
<a name="l00111"></a>00111
<a name="l00116"></a><a class="code" href="classDepUKFB.html#add2cdb1268800eade95915f209e09166">00116</a> <span class="keywordtype">double</span> <a class="code" href="classDepUKFB.html#add2cdb1268800eade95915f209e09166">p_l</a>(<span class="keywordtype">double</span> fc){
<a name="l00117"></a>00117 <span class="comment">// The following reduces to p_51 for constant X</span>
<a name="l00118"></a>00118 <span class="comment">//double p_51=4.0*fc/erb(fc);</span>
<a name="l00119"></a>00119 <span class="comment">// return p_51-0.35*(p_51/p_51_1k)*(X-51.0);</span>
<a name="l00120"></a>00120 <span class="keywordflow">return</span> 4.0*fc/erb(fc);
<a name="l00121"></a>00121 }
<a name="l00122"></a>00122
<a name="l00127"></a><a class="code" href="classDepUKFB.html#ac9c9ed1ccc3a941359ff1d5d8c243c65">00127</a> <span class="keywordtype">double</span> <a class="code" href="classDepUKFB.html#ac9c9ed1ccc3a941359ff1d5d8c243c65">p_u</a>(<span class="keywordtype">double</span> fc){
<a name="l00128"></a>00128 <span class="comment">// The following reduces to p_51 for constant X</span>
<a name="l00129"></a>00129 <span class="comment">//double p_51=4.0*fc/erb(fc);</span>
<a name="l00130"></a>00130 <span class="comment">//return p_51+0.118*(X-51.0);</span>
<a name="l00131"></a>00131 <span class="keywordflow">return</span> 4.0*fc/erb(fc);
<a name="l00132"></a>00132 }
<a name="l00133"></a>00133 <span class="keyword">public</span>:
<a name="l00134"></a><a class="code" href="classDepUKFB.html#ad0783de52b1d2ab777484d344e566514">00134</a> <span class="keywordtype">double</span> *<a class="code" href="classDepUKFB.html#ad0783de52b1d2ab777484d344e566514" title="The filter centre frequencies.">cf</a>;
<a name="l00135"></a><a class="code" href="classDepUKFB.html#aa995091f157e795c2ef67277594c8431">00135</a> <span class="keywordtype">double</span> *<a class="code" href="classDepUKFB.html#aa995091f157e795c2ef67277594c8431" title="The filter edge frequencies.">ef</a>;
<a name="l00136"></a>00136
<a name="l00142"></a><a class="code" href="classDepUKFB.html#a0a7880e97f8ff1f18ce0d50bc117a1c4">00142</a> <a class="code" href="classDepUKFB.html#a0a7880e97f8ff1f18ce0d50bc117a1c4">DepUKFB</a>(<span class="keywordtype">int</span> sampleFreq, <span class="keywordtype">int</span> fCnt=50){
<a name="l00143"></a>00143 <a class="code" href="classDepUKFB.html#ae39f616845a715311d9c2666bb5b086c">init</a>(sampleFreq, fCnt);
<a name="l00144"></a>00144 }
<a name="l00145"></a>00145
<a name="l00151"></a><a class="code" href="classDepUKFB.html#ae39f616845a715311d9c2666bb5b086c">00151</a> <span class="keywordtype">void</span> <a class="code" href="classDepUKFB.html#ae39f616845a715311d9c2666bb5b086c">init</a>(<span class="keywordtype">int</span> sampleFreq, <span class="keywordtype">int</span> fCnt=50){
<a name="l00152"></a>00152 fCount=fCnt;
<a name="l00153"></a>00153 <a class="code" href="classDepUKFB.html#a13cbfe921394b68c53a17878367566a9" title="The sample frequency.">fs</a>=sampleFreq;
<a name="l00154"></a>00154 <a class="code" href="classDepUKFB.html#ad0783de52b1d2ab777484d344e566514" title="The filter centre frequencies.">cf</a>=<a class="code" href="classDepUKFB.html#aa995091f157e795c2ef67277594c8431" title="The filter edge frequencies.">ef</a>=<a class="code" href="classDepUKFB.html#a2a50ed00bdba4a02376f568e9012906c" title="g coeff.">g</a>=NULL;
<a name="l00155"></a>00155 <a class="code" href="classDepUKFB.html#adefe805565fa01861468b5a51ca87a89" title="The filters.">w</a>=NULL;
<a name="l00156"></a>00156 <span class="keywordflow">if</span> (!(<a class="code" href="classDepUKFB.html#a2a50ed00bdba4a02376f568e9012906c" title="g coeff.">g</a>=<span class="keyword">new</span> <span class="keywordtype">double</span>[FREQBINCOUNT])){
<a name="l00157"></a>00157 std::cerr<<<span class="stringliteral">"DepUKFB::DepUKFB: g malloc error"</span><<std::endl;
<a name="l00158"></a>00158 exit(-1);
<a name="l00159"></a>00159 }
<a name="l00160"></a>00160 <span class="keywordflow">if</span> (!(<a class="code" href="classDepUKFB.html#adefe805565fa01861468b5a51ca87a89" title="The filters.">w</a>=<span class="keyword">new</span> <span class="keywordtype">double</span>*[fCount])){
<a name="l00161"></a>00161 std::cerr<<<span class="stringliteral">"DepUKFB::DepUKFB: w malloc error"</span><<std::endl;
<a name="l00162"></a>00162 exit(-1);
<a name="l00163"></a>00163 } <span class="keywordflow">else</span> {
<a name="l00164"></a>00164 <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i=0;i<fCount;i++)
<a name="l00165"></a>00165 <a class="code" href="classDepUKFB.html#adefe805565fa01861468b5a51ca87a89" title="The filters.">w</a>[i]=NULL;
<a name="l00166"></a>00166 <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i=0;i<fCount;i++){
<a name="l00167"></a>00167 <span class="keywordflow">if</span> (!(<a class="code" href="classDepUKFB.html#adefe805565fa01861468b5a51ca87a89" title="The filters.">w</a>[i]=<span class="keyword">new</span> <span class="keywordtype">double</span>[FREQBINCOUNT])){
<a name="l00168"></a>00168 std::cerr<<<span class="stringliteral">"DepUKFB::DepUKFB: w[i] malloc error"</span><<std::endl;
<a name="l00169"></a>00169 exit(-1);
<a name="l00170"></a>00170 }
<a name="l00171"></a>00171 }
<a name="l00172"></a>00172 }
<a name="l00173"></a>00173
<a name="l00174"></a>00174 <span class="keywordflow">if</span> (!(<a class="code" href="classDepUKFB.html#ad0783de52b1d2ab777484d344e566514" title="The filter centre frequencies.">cf</a>=<span class="keyword">new</span> <span class="keywordtype">double</span>[fCount])){
<a name="l00175"></a>00175 std::cerr<<<span class="stringliteral">"DepUKFB::DepUKFB: cf malloc error"</span><<std::endl;
<a name="l00176"></a>00176 exit(-1);
<a name="l00177"></a>00177 }
<a name="l00178"></a>00178
<a name="l00179"></a>00179 <span class="keywordflow">if</span> (!(<a class="code" href="classDepUKFB.html#aa995091f157e795c2ef67277594c8431" title="The filter edge frequencies.">ef</a>=<span class="keyword">new</span> <span class="keywordtype">double</span>[fCount])){
<a name="l00180"></a>00180 std::cerr<<<span class="stringliteral">"DepUKFB::DepUKFB: ef malloc error"</span><<std::endl;
<a name="l00181"></a>00181 exit(-1);
<a name="l00182"></a>00182 }
<a name="l00183"></a>00183
<a name="l00184"></a>00184 <span class="comment">//Place the filter centre freqs ...</span>
<a name="l00185"></a>00185 findCF();
<a name="l00186"></a>00186 <span class="comment">//Step through and fill each filter ...</span>
<a name="l00187"></a>00187 <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i=0;i<fCount;i++)
<a name="l00188"></a>00188 af(<a class="code" href="classDepUKFB.html#ad0783de52b1d2ab777484d344e566514" title="The filter centre frequencies.">cf</a>[i],i);
<a name="l00189"></a>00189 }
<a name="l00190"></a>00190
<a name="l00191"></a><a class="code" href="classDepUKFB.html#a815c8d16189f0f4c4a3e49bf65533ed7">00191</a> <span class="keyword">virtual</span> <a class="code" href="classDepUKFB.html#a815c8d16189f0f4c4a3e49bf65533ed7">~DepUKFB</a>(){
<a name="l00192"></a>00192 <span class="keywordflow">if</span> (<a class="code" href="classDepUKFB.html#a2a50ed00bdba4a02376f568e9012906c" title="g coeff.">g</a>) <span class="keyword">delete</span> [] <a class="code" href="classDepUKFB.html#a2a50ed00bdba4a02376f568e9012906c" title="g coeff.">g</a>;
<a name="l00193"></a>00193 <span class="keywordflow">if</span> (<a class="code" href="classDepUKFB.html#adefe805565fa01861468b5a51ca87a89" title="The filters.">w</a>){
<a name="l00194"></a>00194 <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i=0;i<fCount;i++)
<a name="l00195"></a>00195 <span class="keywordflow">if</span> (<a class="code" href="classDepUKFB.html#adefe805565fa01861468b5a51ca87a89" title="The filters.">w</a>[i]) <span class="keyword">delete</span> [] <a class="code" href="classDepUKFB.html#adefe805565fa01861468b5a51ca87a89" title="The filters.">w</a>[i];
<a name="l00196"></a>00196 <span class="keyword">delete</span> [] <a class="code" href="classDepUKFB.html#adefe805565fa01861468b5a51ca87a89" title="The filters.">w</a>;
<a name="l00197"></a>00197 }
<a name="l00198"></a>00198 <span class="keywordflow">if</span> (<a class="code" href="classDepUKFB.html#ad0783de52b1d2ab777484d344e566514" title="The filter centre frequencies.">cf</a>) <span class="keyword">delete</span> [] <a class="code" href="classDepUKFB.html#ad0783de52b1d2ab777484d344e566514" title="The filter centre frequencies.">cf</a>;
<a name="l00199"></a>00199 <span class="keywordflow">if</span> (<a class="code" href="classDepUKFB.html#aa995091f157e795c2ef67277594c8431" title="The filter edge frequencies.">ef</a>) <span class="keyword">delete</span> [] <a class="code" href="classDepUKFB.html#aa995091f157e795c2ef67277594c8431" title="The filter edge frequencies.">ef</a>;
<a name="l00200"></a>00200 }
<a name="l00201"></a>00201
<a name="l00202"></a><a class="code" href="classDepUKFB.html#aeb2700aa4a1543328be7548e7b89c279">00202</a> <span class="keywordtype">int</span> <a class="code" href="classDepUKFB.html#aeb2700aa4a1543328be7548e7b89c279" title="Returns the number of filters.">filterCount</a>(<span class="keywordtype">void</span>){<span class="keywordflow">return</span> fCount;}
<a name="l00203"></a>00203
<a name="l00208"></a><a class="code" href="classDepUKFB.html#aff2350868073dd42a14f52c1706db577">00208</a> <span class="keywordtype">double</span>* <a class="code" href="classDepUKFB.html#aff2350868073dd42a14f52c1706db577">operator[]</a>(<span class="keywordtype">int</span> i){<span class="keywordflow">return</span> <a class="code" href="classDepUKFB.html#adefe805565fa01861468b5a51ca87a89" title="The filters.">w</a>[i];}
<a name="l00215"></a><a class="code" href="classDepUKFB.html#a9b3723ab1293dc010ad9b50660ba9091">00215</a> <span class="keywordtype">double</span> <a class="code" href="classDepUKFB.html#a9b3723ab1293dc010ad9b50660ba9091">operator()</a>(<span class="keywordtype">int</span> i, <span class="keywordtype">int</span> j, <span class="keywordtype">int</span> binCount){
<a name="l00216"></a>00216 <span class="keywordtype">int</span> index=(int)rint((<span class="keywordtype">double</span>)j*((double)FREQBINCOUNT/(<span class="keywordtype">double</span>)binCount));
<a name="l00217"></a>00217 <span class="comment">//std::cout<<i<<'\t'<<j<<'\t'<<binCount<<'\t'<<index<<std::endl;</span>
<a name="l00218"></a>00218 <span class="keywordflow">return</span> <a class="code" href="classDepUKFB.html#adefe805565fa01861468b5a51ca87a89" title="The filters.">w</a>[i][index];
<a name="l00219"></a>00219 }
<a name="l00220"></a>00220 };
<a name="l00221"></a>00221 <span class="preprocessor">#endif //DEPUKFB_H_</span>
<a name="l00222"></a>00222 <span class="preprocessor"></span>
<a name="l00223"></a>00223
<a name="l00224"></a>00224
</pre></div></div>
<!--- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark"> </span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark"> </span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark"> </span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark"> </span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark"> </span>Variables</a></div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<hr class="footer"/><address style="text-align: right;"><small>Generated on Sat Jun 19 15:23:29 2010 for libaudiomask by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.3 </small></address>
</body>
</html>
|