Willkommen bei WordPress. Dies ist dein erster Beitrag. Bearbeite oder lösche ihn und beginne mit dem Schreiben!
Hallo Welt!
von raredesign | Dez 3, 2019 | Allgemein | 0 Kommentare
Cokiee Shell
Current Path : /proc/self/root/usr/share/doc/libclam-doc/html/ |
Current File : //proc/self/root/usr/share/doc/libclam-doc/html/FrameInterpolator_8cxx_source.html |
<!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"/> <meta http-equiv="X-UA-Compatible" content="IE=9"/> <title>CLAM-Development: FrameInterpolator.cxx Source File</title> <link href="tabs.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="dynsections.js"></script> <link href="doxygen.css" rel="stylesheet" type="text/css" /> </head> <body> <div id="top"><!-- do not remove this div, it is closed by doxygen! --> <div id="titlearea"> <table cellspacing="0" cellpadding="0"> <tbody> <tr style="height: 56px;"> <td style="padding-left: 0.5em;"> <div id="projectname">CLAM-Development  <span id="projectnumber">1.4.0</span> </div> </td> </tr> </tbody> </table> </div> <!-- end header part --> <!-- Generated by Doxygen 1.8.1 --> <div id="navrow1" class="tabs"> <ul class="tablist"> <li><a href="index.html"><span>Main Page</span></a></li> <li><a href="pages.html"><span>Related Pages</span></a></li> <li><a href="modules.html"><span>Modules</span></a></li> <li><a href="namespaces.html"><span>Namespaces</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> </ul> </div> <div id="navrow2" class="tabs2"> <ul class="tablist"> <li><a href="files.html"><span>File List</span></a></li> <li><a href="globals.html"><span>File Members</span></a></li> </ul> </div> <div id="nav-path" class="navpath"> <ul> <li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_098894a2b9860dda60979d343b8f7997.html">Processing</a></li><li class="navelem"><a class="el" href="dir_b887372531da67e55aa09cc69c3d9de1.html">ArithOps</a></li> </ul> </div> </div><!-- top --> <div class="header"> <div class="headertitle"> <div class="title">FrameInterpolator.cxx</div> </div> </div><!--header--> <div class="contents"> <a href="FrameInterpolator_8cxx.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> <span class="comment">/*</span></div> <div class="line"><a name="l00002"></a><span class="lineno"> 2</span> <span class="comment"> * Copyright (c) 2001-2004 MUSIC TECHNOLOGY GROUP (MTG)</span></div> <div class="line"><a name="l00003"></a><span class="lineno"> 3</span> <span class="comment"> * UNIVERSITAT POMPEU FABRA</span></div> <div class="line"><a name="l00004"></a><span class="lineno"> 4</span> <span class="comment"> *</span></div> <div class="line"><a name="l00005"></a><span class="lineno"> 5</span> <span class="comment"> *</span></div> <div class="line"><a name="l00006"></a><span class="lineno"> 6</span> <span class="comment"> * This program is free software; you can redistribute it and/or modify</span></div> <div class="line"><a name="l00007"></a><span class="lineno"> 7</span> <span class="comment"> * it under the terms of the GNU General Public License as published by</span></div> <div class="line"><a name="l00008"></a><span class="lineno"> 8</span> <span class="comment"> * the Free Software Foundation; either version 2 of the License, or</span></div> <div class="line"><a name="l00009"></a><span class="lineno"> 9</span> <span class="comment"> * (at your option) any later version.</span></div> <div class="line"><a name="l00010"></a><span class="lineno"> 10</span> <span class="comment"> *</span></div> <div class="line"><a name="l00011"></a><span class="lineno"> 11</span> <span class="comment"> * This program is distributed in the hope that it will be useful,</span></div> <div class="line"><a name="l00012"></a><span class="lineno"> 12</span> <span class="comment"> * but WITHOUT ANY WARRANTY; without even the implied warranty of</span></div> <div class="line"><a name="l00013"></a><span class="lineno"> 13</span> <span class="comment"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the</span></div> <div class="line"><a name="l00014"></a><span class="lineno"> 14</span> <span class="comment"> * GNU General Public License for more details.</span></div> <div class="line"><a name="l00015"></a><span class="lineno"> 15</span> <span class="comment"> *</span></div> <div class="line"><a name="l00016"></a><span class="lineno"> 16</span> <span class="comment"> * You should have received a copy of the GNU General Public License</span></div> <div class="line"><a name="l00017"></a><span class="lineno"> 17</span> <span class="comment"> * along with this program; if not, write to the Free Software</span></div> <div class="line"><a name="l00018"></a><span class="lineno"> 18</span> <span class="comment"> * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA</span></div> <div class="line"><a name="l00019"></a><span class="lineno"> 19</span> <span class="comment"> *</span></div> <div class="line"><a name="l00020"></a><span class="lineno"> 20</span> <span class="comment"> */</span></div> <div class="line"><a name="l00021"></a><span class="lineno"> 21</span> </div> <div class="line"><a name="l00022"></a><span class="lineno"> 22</span> <span class="preprocessor">#include "<a class="code" href="Complex_8hxx.html">Complex.hxx</a>"</span></div> <div class="line"><a name="l00023"></a><span class="lineno"> 23</span> <span class="preprocessor">#include "<a class="code" href="SpecTypeFlags_8hxx.html">SpecTypeFlags.hxx</a>"</span></div> <div class="line"><a name="l00024"></a><span class="lineno"> 24</span> <span class="preprocessor">#include "<a class="code" href="FrameInterpolator_8hxx.html">FrameInterpolator.hxx</a>"</span></div> <div class="line"><a name="l00025"></a><span class="lineno"> 25</span> <span class="preprocessor">#include "<a class="code" href="BPF_8hxx.html">BPF.hxx</a>"</span></div> <div class="line"><a name="l00026"></a><span class="lineno"> 26</span> <span class="preprocessor">#include "<a class="code" href="Point_8hxx.html">Point.hxx</a>"</span></div> <div class="line"><a name="l00027"></a><span class="lineno"> 27</span> </div> <div class="line"><a name="l00028"></a><span class="lineno"> 28</span> <span class="keyword">namespace </span>CLAM {</div> <div class="line"><a name="l00029"></a><span class="lineno"> 29</span> </div> <div class="line"><a name="l00030"></a><span class="lineno"><a class="code" href="classCLAM_1_1FrameInterpConfig.html#a9935dc380797803f803df720284a8249"> 30</a></span>  <span class="keywordtype">void</span> <a class="code" href="classCLAM_1_1FrameInterpConfig.html#a9935dc380797803f803df720284a8249" title="The concrete dynamic type constructor calls DefaultInit().">FrameInterpConfig::DefaultInit</a>()</div> <div class="line"><a name="l00031"></a><span class="lineno"> 31</span>  {</div> <div class="line"><a name="l00032"></a><span class="lineno"> 32</span>  AddAll();</div> <div class="line"><a name="l00033"></a><span class="lineno"> 33</span>  <a class="code" href="classCLAM_1_1DynamicType.html#a74d1557beda060a62f39b09f0c477fad" title="Method used to resize the data space of the dynamic type, necessary when some AddXXX() / RemoveXXX() ...">UpdateData</a>();</div> <div class="line"><a name="l00034"></a><span class="lineno"> 34</span>  <a class="code" href="classCLAM_1_1FrameInterpConfig.html#a854c2a0dc14eaf2a3f00315196e24811">DefaultValues</a>();</div> <div class="line"><a name="l00035"></a><span class="lineno"> 35</span>  }</div> <div class="line"><a name="l00036"></a><span class="lineno"> 36</span> </div> <div class="line"><a name="l00037"></a><span class="lineno"><a class="code" href="classCLAM_1_1FrameInterpConfig.html#a854c2a0dc14eaf2a3f00315196e24811"> 37</a></span>  <span class="keywordtype">void</span> <a class="code" href="classCLAM_1_1FrameInterpConfig.html#a854c2a0dc14eaf2a3f00315196e24811">FrameInterpConfig::DefaultValues</a>()</div> <div class="line"><a name="l00038"></a><span class="lineno"> 38</span>  {</div> <div class="line"><a name="l00039"></a><span class="lineno"> 39</span>  SetMagInterpolationFactor( 0.0 );</div> <div class="line"><a name="l00040"></a><span class="lineno"> 40</span>  SetFreqInterpolationFactor( 0.0 );</div> <div class="line"><a name="l00041"></a><span class="lineno"> 41</span>  SetPitchInterpolationFactor( 0.0 );</div> <div class="line"><a name="l00042"></a><span class="lineno"> 42</span>  SetResidualInterpolationFactor( 0.0 );</div> <div class="line"><a name="l00043"></a><span class="lineno"> 43</span>  SetHarmonic( <span class="keyword">true</span> );</div> <div class="line"><a name="l00044"></a><span class="lineno"> 44</span>  SetUseSpectralShape(<span class="keyword">false</span>);</div> <div class="line"><a name="l00045"></a><span class="lineno"> 45</span>  }</div> <div class="line"><a name="l00046"></a><span class="lineno"> 46</span> </div> <div class="line"><a name="l00047"></a><span class="lineno"> 47</span> </div> <div class="line"><a name="l00048"></a><span class="lineno"><a class="code" href="classCLAM_1_1FrameInterpolator.html#ac2c2643f7fba3c9aa8b3b8a8ae0e3bb8"> 48</a></span>  <a class="code" href="classCLAM_1_1FrameInterpolator.html#ac2c2643f7fba3c9aa8b3b8a8ae0e3bb8">FrameInterpolator::FrameInterpolator</a>(<span class="keyword">const</span> <a class="code" href="classCLAM_1_1FrameInterpConfig.html">FrameInterpConfig</a> &c)</div> <div class="line"><a name="l00049"></a><span class="lineno"> 49</span>  : mFrameInterpolationFactorCtl(<span class="stringliteral">"FrameInterpolationFactor"</span>,this,&<a class="code" href="classCLAM_1_1FrameInterpolator.html" title="This class performs the interpolation of two Frame processing data objects.">FrameInterpolator</a>::DoFrameFactorControl)</div> <div class="line"><a name="l00050"></a><span class="lineno"> 50</span>  , mMagInterpolationFactorCtl(<span class="stringliteral">"MagInterpolationFactor"</span>,this,&<a class="code" href="classCLAM_1_1FrameInterpolator.html" title="This class performs the interpolation of two Frame processing data objects.">FrameInterpolator</a>::DoMagFactorControl)</div> <div class="line"><a name="l00051"></a><span class="lineno"> 51</span>  , mFreqInterpolationFactorCtl(<span class="stringliteral">"FreqInterpolationFactor"</span>,this,&<a class="code" href="classCLAM_1_1FrameInterpolator.html" title="This class performs the interpolation of two Frame processing data objects.">FrameInterpolator</a>::DoFreqFactorControl)</div> <div class="line"><a name="l00052"></a><span class="lineno"> 52</span>  , mPitchInterpolationFactorCtl(<span class="stringliteral">"PitchInterpolationFactor"</span>,this,&<a class="code" href="classCLAM_1_1FrameInterpolator.html" title="This class performs the interpolation of two Frame processing data objects.">FrameInterpolator</a>::DoPitchFactorControl)</div> <div class="line"><a name="l00053"></a><span class="lineno"> 53</span>  , mResidualInterpolationFactorCtl(<span class="stringliteral">"ResidualInterpolationFactor"</span>,this,&<a class="code" href="classCLAM_1_1FrameInterpolator.html" title="This class performs the interpolation of two Frame processing data objects.">FrameInterpolator</a>::DoResidualFactorControl)</div> <div class="line"><a name="l00054"></a><span class="lineno"> 54</span>  , mPitch1Ctl(<span class="stringliteral">"Pitch1"</span>,this,&<a class="code" href="classCLAM_1_1FrameInterpolator.html" title="This class performs the interpolation of two Frame processing data objects.">FrameInterpolator</a>::DoPitch1Control)</div> <div class="line"><a name="l00055"></a><span class="lineno"> 55</span>  , mPitch2Ctl(<span class="stringliteral">"Pitch2"</span>,this,&<a class="code" href="classCLAM_1_1FrameInterpolator.html" title="This class performs the interpolation of two Frame processing data objects.">FrameInterpolator</a>::DoPitch2Control)</div> <div class="line"><a name="l00056"></a><span class="lineno"> 56</span>  , mIsHarmonicCtl(<span class="stringliteral">"IsHarmonic"</span>,this,&<a class="code" href="classCLAM_1_1FrameInterpolator.html" title="This class performs the interpolation of two Frame processing data objects.">FrameInterpolator</a>::DoHarmonicControl)</div> <div class="line"><a name="l00057"></a><span class="lineno"> 57</span>  , mIn1(<span class="stringliteral">"Input 1"</span>,this)</div> <div class="line"><a name="l00058"></a><span class="lineno"> 58</span>  , mIn2(<span class="stringliteral">"Input 2"</span>,this)</div> <div class="line"><a name="l00059"></a><span class="lineno"> 59</span>  , mOut(<span class="stringliteral">"Output"</span>,this)</div> <div class="line"><a name="l00060"></a><span class="lineno"> 60</span>  , mpSpectralShape(0)</div> <div class="line"><a name="l00061"></a><span class="lineno"> 61</span>  {</div> <div class="line"><a name="l00062"></a><span class="lineno"> 62</span>  AttachChildren();</div> <div class="line"><a name="l00063"></a><span class="lineno"> 63</span>  <a class="code" href="classCLAM_1_1Processing.html#a586222b159a5b27b5bbb830a125fccc0" title="Configuration change method.">Configure</a>(c);</div> <div class="line"><a name="l00064"></a><span class="lineno"> 64</span>  }</div> <div class="line"><a name="l00065"></a><span class="lineno"> 65</span> </div> <div class="line"><a name="l00066"></a><span class="lineno"> 66</span> </div> <div class="line"><a name="l00067"></a><span class="lineno"> 67</span>  <span class="keywordtype">bool</span> FrameInterpolator::ConcreteConfigure(<span class="keyword">const</span> <a class="code" href="classCLAM_1_1ProcessingConfig.html" title="This is an abstract class which serves as interface for configuration classes used as processing obje...">ProcessingConfig</a>&c)</div> <div class="line"><a name="l00068"></a><span class="lineno"> 68</span>  {</div> <div class="line"><a name="l00069"></a><span class="lineno"> 69</span>  <a class="code" href="classCLAM_1_1Processing.html#afc32b9790688f2875b42e4ab169389c6" title="Helper template to convert a reference to a ProcessingConfig to the concrete ProcessingConfig specifi...">CopyAsConcreteConfig</a>(mConfig, c);</div> <div class="line"><a name="l00070"></a><span class="lineno"> 70</span> </div> <div class="line"><a name="l00071"></a><span class="lineno"> 71</span>  <span class="comment">//Configure children processing</span></div> <div class="line"><a name="l00072"></a><span class="lineno"> 72</span>  <a class="code" href="classCLAM_1_1PeaksInterpConfig.html">PeaksInterpConfig</a> pkInterpConfig;</div> <div class="line"><a name="l00073"></a><span class="lineno"> 73</span>  pkInterpConfig.SetMagInterpolationFactor(mConfig.GetMagInterpolationFactor());</div> <div class="line"><a name="l00074"></a><span class="lineno"> 74</span>  pkInterpConfig.SetFreqInterpolationFactor(mConfig.GetFreqInterpolationFactor());</div> <div class="line"><a name="l00075"></a><span class="lineno"> 75</span>  pkInterpConfig.SetPitchInterpolationFactor(mConfig.GetPitchInterpolationFactor());</div> <div class="line"><a name="l00076"></a><span class="lineno"> 76</span>  pkInterpConfig.SetHarmonic(mConfig.GetHarmonic());</div> <div class="line"><a name="l00077"></a><span class="lineno"> 77</span>  pkInterpConfig.SetUseSpectralShape(mConfig.GetUseSpectralShape());</div> <div class="line"><a name="l00078"></a><span class="lineno"> 78</span>  mPO_PeaksInterpolator.<a class="code" href="classCLAM_1_1Processing.html#a586222b159a5b27b5bbb830a125fccc0" title="Configuration change method.">Configure</a>(pkInterpConfig);</div> <div class="line"><a name="l00079"></a><span class="lineno"> 79</span> </div> <div class="line"><a name="l00080"></a><span class="lineno"> 80</span>  <span class="comment">//todo: using Interpolator with ports is still not available!!</span></div> <div class="line"><a name="l00081"></a><span class="lineno"> 81</span>  <span class="keywordflow">if</span>(mConfig.GetUseSpectralShape())</div> <div class="line"><a name="l00082"></a><span class="lineno"> 82</span>  {</div> <div class="line"><a name="l00083"></a><span class="lineno"> 83</span>  mPO_PeaksInterpolator.<a class="code" href="classCLAM_1_1SpectralPeakArrayInterpolator.html#a6193f04d17ace929215db8c0c1141578">AttachSpectralShape</a>(*<a class="code" href="classCLAM_1_1FrameInterpolator.html#a938037a13c476afc66531e0234d0991f">mpSpectralShape</a>);</div> <div class="line"><a name="l00084"></a><span class="lineno"> 84</span>  }</div> <div class="line"><a name="l00085"></a><span class="lineno"> 85</span> </div> <div class="line"><a name="l00086"></a><span class="lineno"> 86</span>  SpecInterpConfig spInterpConfig;</div> <div class="line"><a name="l00087"></a><span class="lineno"> 87</span>  spInterpConfig.SetInterpolationFactor(mConfig.GetResidualInterpolationFactor());</div> <div class="line"><a name="l00088"></a><span class="lineno"> 88</span> </div> <div class="line"><a name="l00089"></a><span class="lineno"> 89</span>  mPO_SpectrumInterpolator.<a class="code" href="classCLAM_1_1Processing.html#a586222b159a5b27b5bbb830a125fccc0" title="Configuration change method.">Configure</a>(spInterpConfig);</div> <div class="line"><a name="l00090"></a><span class="lineno"> 90</span> </div> <div class="line"><a name="l00091"></a><span class="lineno"> 91</span>  <span class="comment">//Initialize interpolation factor control from value in the configuration</span></div> <div class="line"><a name="l00092"></a><span class="lineno"> 92</span>  <a class="code" href="classCLAM_1_1FrameInterpolator.html#a07ae1e0663a4b58c7b2fdc3492bbedb4">mMagInterpolationFactorCtl</a>.<a class="code" href="classCLAM_1_1InControl.html#a29ada68a41024dfa0c09ef4faf3ecdc1" title="The control receives a value when this method gets called. Associated callback if any...">DoControl</a>(mConfig.GetMagInterpolationFactor());</div> <div class="line"><a name="l00093"></a><span class="lineno"> 93</span>  <a class="code" href="classCLAM_1_1FrameInterpolator.html#aa0dc38bdf7464af0a58391facc63aa8e">mFreqInterpolationFactorCtl</a>.<a class="code" href="classCLAM_1_1InControl.html#a29ada68a41024dfa0c09ef4faf3ecdc1" title="The control receives a value when this method gets called. Associated callback if any...">DoControl</a>(mConfig.GetFreqInterpolationFactor());</div> <div class="line"><a name="l00094"></a><span class="lineno"> 94</span>  <a class="code" href="classCLAM_1_1FrameInterpolator.html#a6f98bd24cd410d37e7cd0d4e3eeb396b">mPitchInterpolationFactorCtl</a>.<a class="code" href="classCLAM_1_1InControl.html#a29ada68a41024dfa0c09ef4faf3ecdc1" title="The control receives a value when this method gets called. Associated callback if any...">DoControl</a>(mConfig.GetPitchInterpolationFactor());</div> <div class="line"><a name="l00095"></a><span class="lineno"> 95</span>  <a class="code" href="classCLAM_1_1FrameInterpolator.html#a21a192488ce7fa9728398de69de336d4">mResidualInterpolationFactorCtl</a>.<a class="code" href="classCLAM_1_1InControl.html#a29ada68a41024dfa0c09ef4faf3ecdc1" title="The control receives a value when this method gets called. Associated callback if any...">DoControl</a>(mConfig.GetResidualInterpolationFactor());</div> <div class="line"><a name="l00096"></a><span class="lineno"> 96</span>  <a class="code" href="classCLAM_1_1FrameInterpolator.html#ac4876a1f218c7f829a66aa402aabc982" title="Input control for whether harmonic interpolation has to be performed.">mIsHarmonicCtl</a>.<a class="code" href="classCLAM_1_1InControl.html#a29ada68a41024dfa0c09ef4faf3ecdc1" title="The control receives a value when this method gets called. Associated callback if any...">DoControl</a>(mConfig.GetHarmonic());</div> <div class="line"><a name="l00097"></a><span class="lineno"> 97</span> </div> <div class="line"><a name="l00098"></a><span class="lineno"> 98</span>  <span class="keywordflow">return</span> <span class="keyword">true</span>;</div> <div class="line"><a name="l00099"></a><span class="lineno"> 99</span>  }</div> <div class="line"><a name="l00100"></a><span class="lineno"> 100</span> </div> <div class="line"><a name="l00101"></a><span class="lineno"> 101</span>  <span class="keywordtype">void</span> FrameInterpolator::AttachChildren()</div> <div class="line"><a name="l00102"></a><span class="lineno"> 102</span>  {</div> <div class="line"><a name="l00103"></a><span class="lineno"> 103</span>  mPO_SpectrumInterpolator.<a class="code" href="classCLAM_1_1Processing.html#ae882ffd6dca37a47a93a5d6b723959a0">SetParent</a>(<span class="keyword">this</span>);</div> <div class="line"><a name="l00104"></a><span class="lineno"> 104</span>  mPO_PeaksInterpolator.<a class="code" href="classCLAM_1_1Processing.html#ae882ffd6dca37a47a93a5d6b723959a0">SetParent</a>(<span class="keyword">this</span>);</div> <div class="line"><a name="l00105"></a><span class="lineno"> 105</span>  }</div> <div class="line"><a name="l00106"></a><span class="lineno"> 106</span> </div> <div class="line"><a name="l00107"></a><span class="lineno"> 107</span> </div> <div class="line"><a name="l00108"></a><span class="lineno"> 108</span>  <span class="comment">// Unsupervised Do() function.</span></div> <div class="line"><a name="l00109"></a><span class="lineno"><a class="code" href="classCLAM_1_1FrameInterpolator.html#a33ec29f13e16e02ba86a8a74c9d2dcc2"> 109</a></span>  <span class="keywordtype">bool</span> <a class="code" href="classCLAM_1_1FrameInterpolator.html#a0bd90ed168b89648764e76545d18b4f6" title="Supervised mode execution method (using ports)">FrameInterpolator::Do</a>(<span class="keyword">const</span> <a class="code" href="classCLAM_1_1Frame.html" title="Processing Data class to encapsulate a frame and all its related information.">Frame</a>& in1, <span class="keyword">const</span> <a class="code" href="classCLAM_1_1Frame.html" title="Processing Data class to encapsulate a frame and all its related information.">Frame</a>& in2, <a class="code" href="classCLAM_1_1Frame.html" title="Processing Data class to encapsulate a frame and all its related information.">Frame</a>& out)</div> <div class="line"><a name="l00110"></a><span class="lineno"> 110</span>  {</div> <div class="line"><a name="l00111"></a><span class="lineno"> 111</span>  <a class="code" href="Assert_8hxx.html#a74510ab691cb933dbe30c4943651ba1d">CLAM_DEBUG_ASSERT</a>(<a class="code" href="classCLAM_1_1Processing.html#ab8b86869f09192ab1bcae5d1a3d3b4a9">IsRunning</a>(),</div> <div class="line"><a name="l00112"></a><span class="lineno"> 112</span>  <span class="stringliteral">"FrameInterpolator::Do(): Not in execution mode"</span>);</div> <div class="line"><a name="l00113"></a><span class="lineno"> 113</span> </div> <div class="line"><a name="l00114"></a><span class="lineno"> 114</span>  <span class="keywordflow">if</span>(in1.<a class="code" href="classCLAM_1_1Frame.html#a64b3dc57347e58b65d4cade15cc9d337" title="Returns the fundamental frequency at a given index.">GetFundamentalFreq</a>()!=0 && in2.<a class="code" href="classCLAM_1_1Frame.html#a64b3dc57347e58b65d4cade15cc9d337" title="Returns the fundamental frequency at a given index.">GetFundamentalFreq</a>()!=0 && mConfig.GetHarmonic())</div> <div class="line"><a name="l00115"></a><span class="lineno"> 115</span>  <a class="code" href="classCLAM_1_1FrameInterpolator.html#ac4876a1f218c7f829a66aa402aabc982" title="Input control for whether harmonic interpolation has to be performed.">mIsHarmonicCtl</a>.<a class="code" href="classCLAM_1_1InControl.html#a29ada68a41024dfa0c09ef4faf3ecdc1" title="The control receives a value when this method gets called. Associated callback if any...">DoControl</a>(1);</div> <div class="line"><a name="l00116"></a><span class="lineno"> 116</span>  <span class="keywordflow">else</span> <a class="code" href="classCLAM_1_1FrameInterpolator.html#ac4876a1f218c7f829a66aa402aabc982" title="Input control for whether harmonic interpolation has to be performed.">mIsHarmonicCtl</a>.<a class="code" href="classCLAM_1_1InControl.html#a29ada68a41024dfa0c09ef4faf3ecdc1" title="The control receives a value when this method gets called. Associated callback if any...">DoControl</a>(0);</div> <div class="line"><a name="l00117"></a><span class="lineno"> 117</span> </div> <div class="line"><a name="l00118"></a><span class="lineno"> 118</span>  <a class="code" href="classCLAM_1_1FrameInterpolator.html#aa0b28a249aff4a44eb98f1446c3a3e5a" title="Input controls for input pitch needed for harmonic interpolation.">mPitch1Ctl</a>.<a class="code" href="classCLAM_1_1InControl.html#a29ada68a41024dfa0c09ef4faf3ecdc1" title="The control receives a value when this method gets called. Associated callback if any...">DoControl</a>(in1.<a class="code" href="classCLAM_1_1Frame.html#a64b3dc57347e58b65d4cade15cc9d337" title="Returns the fundamental frequency at a given index.">GetFundamentalFreq</a>());</div> <div class="line"><a name="l00119"></a><span class="lineno"> 119</span>  <a class="code" href="classCLAM_1_1FrameInterpolator.html#aad4b8026ed415db678614f31a5c21291">mPitch2Ctl</a>.<a class="code" href="classCLAM_1_1InControl.html#a29ada68a41024dfa0c09ef4faf3ecdc1" title="The control receives a value when this method gets called. Associated callback if any...">DoControl</a>(in2.<a class="code" href="classCLAM_1_1Frame.html#a64b3dc57347e58b65d4cade15cc9d337" title="Returns the fundamental frequency at a given index.">GetFundamentalFreq</a>());</div> <div class="line"><a name="l00120"></a><span class="lineno"> 120</span> </div> <div class="line"><a name="l00121"></a><span class="lineno"> 121</span>  <a class="code" href="namespaceCLAM.html#ab9c6321b061069797fcc173f61e8111a">TData</a> newPitch=<a class="code" href="classCLAM_1_1FrameInterpolator.html#aa0b28a249aff4a44eb98f1446c3a3e5a" title="Input controls for input pitch needed for harmonic interpolation.">mPitch1Ctl</a>.<a class="code" href="classCLAM_1_1InControl.html#ae20e28c58eff3400515a71aaa5aa4e42" title="Returns the last received value.">GetLastValue</a>()*(1-<a class="code" href="classCLAM_1_1FrameInterpolator.html#a6f98bd24cd410d37e7cd0d4e3eeb396b">mPitchInterpolationFactorCtl</a>.<a class="code" href="classCLAM_1_1InControl.html#ae20e28c58eff3400515a71aaa5aa4e42" title="Returns the last received value.">GetLastValue</a>())+<a class="code" href="classCLAM_1_1FrameInterpolator.html#aad4b8026ed415db678614f31a5c21291">mPitch2Ctl</a>.<a class="code" href="classCLAM_1_1InControl.html#ae20e28c58eff3400515a71aaa5aa4e42" title="Returns the last received value.">GetLastValue</a>()*<a class="code" href="classCLAM_1_1FrameInterpolator.html#a6f98bd24cd410d37e7cd0d4e3eeb396b">mPitchInterpolationFactorCtl</a>.<a class="code" href="classCLAM_1_1InControl.html#ae20e28c58eff3400515a71aaa5aa4e42" title="Returns the last received value.">GetLastValue</a>();</div> <div class="line"><a name="l00122"></a><span class="lineno"> 122</span>  <span class="keywordflow">if</span>(!<a class="code" href="classCLAM_1_1FrameInterpolator.html#ac4876a1f218c7f829a66aa402aabc982" title="Input control for whether harmonic interpolation has to be performed.">mIsHarmonicCtl</a>.<a class="code" href="classCLAM_1_1InControl.html#ae20e28c58eff3400515a71aaa5aa4e42" title="Returns the last received value.">GetLastValue</a>()) newPitch=0;</div> <div class="line"><a name="l00123"></a><span class="lineno"> 123</span>  <span class="comment">//Sets new fund freq</span></div> <div class="line"><a name="l00124"></a><span class="lineno"> 124</span>  </div> <div class="line"><a name="l00125"></a><span class="lineno"> 125</span>  <span class="keywordflow">if</span>(out.GetFundamental().GetnCandidates()==0)</div> <div class="line"><a name="l00126"></a><span class="lineno"> 126</span>  out.GetFundamental().AddElem(newPitch,0);</div> <div class="line"><a name="l00127"></a><span class="lineno"> 127</span>  <span class="keywordflow">else</span></div> <div class="line"><a name="l00128"></a><span class="lineno"> 128</span>  out.GetFundamental().SetFreq(0,newPitch);</div> <div class="line"><a name="l00129"></a><span class="lineno"> 129</span>  out.GetFundamental().SetnCandidates(1);</div> <div class="line"><a name="l00130"></a><span class="lineno"> 130</span> </div> <div class="line"><a name="l00131"></a><span class="lineno"> 131</span>  <span class="keywordflow">if</span>(mConfig.GetUseSpectralShape())</div> <div class="line"><a name="l00132"></a><span class="lineno"> 132</span>  mPO_PeaksInterpolator.<a class="code" href="classCLAM_1_1SpectralPeakArrayInterpolator.html#a396363d0d8204243b58536c25617dc6f" title="Supervised mode execution method (using ports)">Do</a>(</div> <div class="line"><a name="l00133"></a><span class="lineno"> 133</span>  in1.GetSpectralPeakArray(),</div> <div class="line"><a name="l00134"></a><span class="lineno"> 134</span>  in2.GetSpectralPeakArray(),</div> <div class="line"><a name="l00135"></a><span class="lineno"> 135</span>  *<a class="code" href="classCLAM_1_1FrameInterpolator.html#a938037a13c476afc66531e0234d0991f">mpSpectralShape</a>,</div> <div class="line"><a name="l00136"></a><span class="lineno"> 136</span>  out.GetSpectralPeakArray() );</div> <div class="line"><a name="l00137"></a><span class="lineno"> 137</span>  <span class="keywordflow">else</span></div> <div class="line"><a name="l00138"></a><span class="lineno"> 138</span>  mPO_PeaksInterpolator.<a class="code" href="classCLAM_1_1SpectralPeakArrayInterpolator.html#a396363d0d8204243b58536c25617dc6f" title="Supervised mode execution method (using ports)">Do</a>(in1.GetSpectralPeakArray(),in2.GetSpectralPeakArray(),out.GetSpectralPeakArray());</div> <div class="line"><a name="l00139"></a><span class="lineno"> 139</span>  mPO_SpectrumInterpolator.<a class="code" href="classCLAM_1_1SpectrumInterpolator.html#a5abd5ff0fecb70d80f7324c0dc83ab1a" title="Supervised mode execution method (using ports)">Do</a>(in1.GetResidualSpec(),in2.GetResidualSpec(),out.GetResidualSpec());</div> <div class="line"><a name="l00140"></a><span class="lineno"> 140</span> </div> <div class="line"><a name="l00141"></a><span class="lineno"> 141</span>  <span class="keywordflow">return</span> <span class="keyword">true</span>;</div> <div class="line"><a name="l00142"></a><span class="lineno"> 142</span>  }</div> <div class="line"><a name="l00143"></a><span class="lineno"> 143</span> </div> <div class="line"><a name="l00144"></a><span class="lineno"><a class="code" href="classCLAM_1_1FrameInterpolator.html#a0bd90ed168b89648764e76545d18b4f6"> 144</a></span>  <span class="keywordtype">bool</span> <a class="code" href="classCLAM_1_1FrameInterpolator.html#a0bd90ed168b89648764e76545d18b4f6" title="Supervised mode execution method (using ports)">FrameInterpolator::Do</a>(<span class="keywordtype">void</span>)</div> <div class="line"><a name="l00145"></a><span class="lineno"> 145</span>  {</div> <div class="line"><a name="l00146"></a><span class="lineno"> 146</span>  <a class="code" href="Assert_8hxx.html#a0013fa617be6fec21a9ad7180e7d8cff" title="An assertion is a check on an expression that must be true given that all the contracts are fullfille...">CLAM_ASSERT</a>(<span class="keyword">false</span>,<span class="stringliteral">"FrameInterpolator::Do(): Not implemented"</span>);</div> <div class="line"><a name="l00147"></a><span class="lineno"> 147</span> </div> <div class="line"><a name="l00148"></a><span class="lineno"> 148</span>  <span class="keywordflow">return</span> <span class="keyword">true</span>;</div> <div class="line"><a name="l00149"></a><span class="lineno"> 149</span>  }</div> <div class="line"><a name="l00150"></a><span class="lineno"> 150</span> </div> <div class="line"><a name="l00151"></a><span class="lineno"> 151</span>  </div> <div class="line"><a name="l00152"></a><span class="lineno"> 152</span>  <span class="keywordtype">void</span> FrameInterpolator::DoFrameFactorControl(<a class="code" href="namespaceCLAM.html#aa961ac47b3ce3d0ab3a96bed3f786fb9" title="Control events type.">TControlData</a> value)</div> <div class="line"><a name="l00153"></a><span class="lineno"> 153</span>  {</div> <div class="line"><a name="l00154"></a><span class="lineno"> 154</span>  <a class="code" href="classCLAM_1_1FrameInterpolator.html#a07ae1e0663a4b58c7b2fdc3492bbedb4">mMagInterpolationFactorCtl</a>.<a class="code" href="classCLAM_1_1InControl.html#a29ada68a41024dfa0c09ef4faf3ecdc1" title="The control receives a value when this method gets called. Associated callback if any...">DoControl</a>(value);</div> <div class="line"><a name="l00155"></a><span class="lineno"> 155</span>  <a class="code" href="classCLAM_1_1FrameInterpolator.html#aa0dc38bdf7464af0a58391facc63aa8e">mFreqInterpolationFactorCtl</a>.<a class="code" href="classCLAM_1_1InControl.html#a29ada68a41024dfa0c09ef4faf3ecdc1" title="The control receives a value when this method gets called. Associated callback if any...">DoControl</a>(value);</div> <div class="line"><a name="l00156"></a><span class="lineno"> 156</span>  <a class="code" href="classCLAM_1_1FrameInterpolator.html#a6f98bd24cd410d37e7cd0d4e3eeb396b">mPitchInterpolationFactorCtl</a>.<a class="code" href="classCLAM_1_1InControl.html#a29ada68a41024dfa0c09ef4faf3ecdc1" title="The control receives a value when this method gets called. Associated callback if any...">DoControl</a>(value);</div> <div class="line"><a name="l00157"></a><span class="lineno"> 157</span>  <a class="code" href="classCLAM_1_1FrameInterpolator.html#a21a192488ce7fa9728398de69de336d4">mResidualInterpolationFactorCtl</a>.<a class="code" href="classCLAM_1_1InControl.html#a29ada68a41024dfa0c09ef4faf3ecdc1" title="The control receives a value when this method gets called. Associated callback if any...">DoControl</a>(value);</div> <div class="line"><a name="l00158"></a><span class="lineno"> 158</span>  }</div> <div class="line"><a name="l00159"></a><span class="lineno"> 159</span> </div> <div class="line"><a name="l00160"></a><span class="lineno"> 160</span>  <span class="keywordtype">void</span> FrameInterpolator::DoMagFactorControl(<a class="code" href="namespaceCLAM.html#aa961ac47b3ce3d0ab3a96bed3f786fb9" title="Control events type.">TControlData</a> value)</div> <div class="line"><a name="l00161"></a><span class="lineno"> 161</span>  {</div> <div class="line"><a name="l00162"></a><span class="lineno"> 162</span>  mPO_PeaksInterpolator.<a class="code" href="classCLAM_1_1SpectralPeakArrayInterpolator.html#ab1c7c5fabdaadce69bc78b10a6fbc5af" title="Input control for interpolation factor.">mMagInterpolationFactorCtl</a>.<a class="code" href="classCLAM_1_1InControl.html#a29ada68a41024dfa0c09ef4faf3ecdc1" title="The control receives a value when this method gets called. Associated callback if any...">DoControl</a>(value);</div> <div class="line"><a name="l00163"></a><span class="lineno"> 163</span>  }</div> <div class="line"><a name="l00164"></a><span class="lineno"> 164</span> </div> <div class="line"><a name="l00165"></a><span class="lineno"> 165</span>  <span class="keywordtype">void</span> FrameInterpolator::DoFreqFactorControl(<a class="code" href="namespaceCLAM.html#aa961ac47b3ce3d0ab3a96bed3f786fb9" title="Control events type.">TControlData</a> value)</div> <div class="line"><a name="l00166"></a><span class="lineno"> 166</span>  {</div> <div class="line"><a name="l00167"></a><span class="lineno"> 167</span>  mPO_PeaksInterpolator.<a class="code" href="classCLAM_1_1SpectralPeakArrayInterpolator.html#ab18e4cb1e46b3319f99f7b74f4515c3d">mFreqInterpolationFactorCtl</a>.<a class="code" href="classCLAM_1_1InControl.html#a29ada68a41024dfa0c09ef4faf3ecdc1" title="The control receives a value when this method gets called. Associated callback if any...">DoControl</a>(value);</div> <div class="line"><a name="l00168"></a><span class="lineno"> 168</span>  }</div> <div class="line"><a name="l00169"></a><span class="lineno"> 169</span> </div> <div class="line"><a name="l00170"></a><span class="lineno"> 170</span>  <span class="keywordtype">void</span> FrameInterpolator::DoPitchFactorControl(<a class="code" href="namespaceCLAM.html#aa961ac47b3ce3d0ab3a96bed3f786fb9" title="Control events type.">TControlData</a> value)</div> <div class="line"><a name="l00171"></a><span class="lineno"> 171</span>  {</div> <div class="line"><a name="l00172"></a><span class="lineno"> 172</span>  mPO_PeaksInterpolator.<a class="code" href="classCLAM_1_1SpectralPeakArrayInterpolator.html#acc4d721d78fe2a1b690c884dc513b3db">mPitchInterpolationFactorCtl</a>.<a class="code" href="classCLAM_1_1InControl.html#a29ada68a41024dfa0c09ef4faf3ecdc1" title="The control receives a value when this method gets called. Associated callback if any...">DoControl</a>(value);</div> <div class="line"><a name="l00173"></a><span class="lineno"> 173</span>  }</div> <div class="line"><a name="l00174"></a><span class="lineno"> 174</span> </div> <div class="line"><a name="l00175"></a><span class="lineno"> 175</span>  <span class="keywordtype">void</span> FrameInterpolator::DoResidualFactorControl(<a class="code" href="namespaceCLAM.html#aa961ac47b3ce3d0ab3a96bed3f786fb9" title="Control events type.">TControlData</a> value)</div> <div class="line"><a name="l00176"></a><span class="lineno"> 176</span>  {</div> <div class="line"><a name="l00177"></a><span class="lineno"> 177</span>  mPO_SpectrumInterpolator.<a class="code" href="classCLAM_1_1SpectrumInterpolator.html#af58ff14c3b4a999add702f8c1c3031e1" title="Input control for interpolation factor.">mInterpolationFactorCtl</a>.<a class="code" href="classCLAM_1_1InControl.html#a29ada68a41024dfa0c09ef4faf3ecdc1" title="The control receives a value when this method gets called. Associated callback if any...">DoControl</a>(value);</div> <div class="line"><a name="l00178"></a><span class="lineno"> 178</span>  }</div> <div class="line"><a name="l00179"></a><span class="lineno"> 179</span> </div> <div class="line"><a name="l00180"></a><span class="lineno"> 180</span>  <span class="keywordtype">void</span> FrameInterpolator::DoPitch1Control(<a class="code" href="namespaceCLAM.html#aa961ac47b3ce3d0ab3a96bed3f786fb9" title="Control events type.">TControlData</a> value)</div> <div class="line"><a name="l00181"></a><span class="lineno"> 181</span>  {</div> <div class="line"><a name="l00182"></a><span class="lineno"> 182</span>  mPO_PeaksInterpolator.<a class="code" href="classCLAM_1_1SpectralPeakArrayInterpolator.html#aa37d0c690fe0a951da38ec4312cb6080" title="Input controls for input pitch needed for harmonic interpolation.">mPitch1Ctl</a>.<a class="code" href="classCLAM_1_1InControl.html#a29ada68a41024dfa0c09ef4faf3ecdc1" title="The control receives a value when this method gets called. Associated callback if any...">DoControl</a>(value);</div> <div class="line"><a name="l00183"></a><span class="lineno"> 183</span>  }</div> <div class="line"><a name="l00184"></a><span class="lineno"> 184</span> </div> <div class="line"><a name="l00185"></a><span class="lineno"> 185</span>  <span class="keywordtype">void</span> FrameInterpolator::DoPitch2Control(<a class="code" href="namespaceCLAM.html#aa961ac47b3ce3d0ab3a96bed3f786fb9" title="Control events type.">TControlData</a> value)</div> <div class="line"><a name="l00186"></a><span class="lineno"> 186</span>  {</div> <div class="line"><a name="l00187"></a><span class="lineno"> 187</span>  mPO_PeaksInterpolator.<a class="code" href="classCLAM_1_1SpectralPeakArrayInterpolator.html#a5083bfe96108698dae92b6acb0cb6ec3">mPitch2Ctl</a>.<a class="code" href="classCLAM_1_1InControl.html#a29ada68a41024dfa0c09ef4faf3ecdc1" title="The control receives a value when this method gets called. Associated callback if any...">DoControl</a>(value);</div> <div class="line"><a name="l00188"></a><span class="lineno"> 188</span>  }</div> <div class="line"><a name="l00189"></a><span class="lineno"> 189</span> </div> <div class="line"><a name="l00190"></a><span class="lineno"> 190</span>  <span class="keywordtype">void</span> FrameInterpolator::DoHarmonicControl(<a class="code" href="namespaceCLAM.html#aa961ac47b3ce3d0ab3a96bed3f786fb9" title="Control events type.">TControlData</a> value)</div> <div class="line"><a name="l00191"></a><span class="lineno"> 191</span>  {</div> <div class="line"><a name="l00192"></a><span class="lineno"> 192</span>  mPO_PeaksInterpolator.<a class="code" href="classCLAM_1_1SpectralPeakArrayInterpolator.html#a0d455768ea97c69db85815220a38a420" title="Input control for whether harmonic interpolation has to be performed.">mIsHarmonicCtl</a>.<a class="code" href="classCLAM_1_1InControl.html#a29ada68a41024dfa0c09ef4faf3ecdc1" title="The control receives a value when this method gets called. Associated callback if any...">DoControl</a>(value);</div> <div class="line"><a name="l00193"></a><span class="lineno"> 193</span>  }</div> <div class="line"><a name="l00194"></a><span class="lineno"> 194</span> </div> <div class="line"><a name="l00195"></a><span class="lineno"> 195</span> </div> <div class="line"><a name="l00196"></a><span class="lineno"> 196</span> </div> <div class="line"><a name="l00197"></a><span class="lineno"> 197</span> }</div> <div class="line"><a name="l00198"></a><span class="lineno"> 198</span> </div> </div><!-- fragment --></div><!-- contents --> <!-- start footer part --> <hr class="footer"/><address class="footer"><small> Generated by  <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/> </a> 1.8.1 </small></address> </body> </html>
Cokiee Shell Web 1.0, Coded By Razor
Neueste Kommentare