diff code-docs/SpectralCentroid_8cpp_source.html @ 6:27319718b1f8 vamp-plugin-sdk-v2.7

Update code docs to v2.7 SDK
author Chris Cannam
date Fri, 24 Feb 2017 16:44:47 +0000
parents 5c2683745b33
children
line wrap: on
line diff
--- a/code-docs/SpectralCentroid_8cpp_source.html	Tue Dec 03 16:43:33 2013 +0000
+++ b/code-docs/SpectralCentroid_8cpp_source.html	Fri Feb 24 16:44:47 2017 +0000
@@ -3,64 +3,51 @@
 <head>
 <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
 <meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.8.13"/>
+<meta name="viewport" content="width=device-width, initial-scale=1"/>
 <title>VampPluginSDK: SpectralCentroid.cpp Source File</title>
-
 <link href="tabs.css" rel="stylesheet" type="text/css"/>
-<link href="doxygen.css" rel="stylesheet" type="text/css" />
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
 <link href="navtree.css" rel="stylesheet" type="text/css"/>
-<script type="text/javascript" src="jquery.js"></script>
 <script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
 <script type="text/javascript" src="navtree.js"></script>
 <script type="text/javascript">
   $(document).ready(initResizable);
 </script>
-
-
+<link href="doxygen.css" rel="stylesheet" type="text/css" />
 </head>
 <body>
-<div id="top"><!-- do not remove this div! -->
-
-
+<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;">
+  <td id="projectalign" style="padding-left: 0.5em;">
    <div id="projectname">VampPluginSDK
-   &#160;<span id="projectnumber">2.4</span>
+   &#160;<span id="projectnumber">2.7</span>
    </div>
-   
   </td>
-  
-  
-  
  </tr>
  </tbody>
 </table>
 </div>
-
-<!-- Generated by Doxygen 1.8.0 -->
-  <div id="navrow1" class="tabs">
-    <ul class="tablist">
-      <li><a href="index.html"><span>Main&#160;Page</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>
-      <li><a href="dirs.html"><span>Directories</span></a></li>
-    </ul>
-  </div>
-  <div id="navrow2" class="tabs2">
-    <ul class="tablist">
-      <li><a href="files.html"><span>File&#160;List</span></a></li>
-      <li><a href="globals.html"><span>File&#160;Members</span></a></li>
-    </ul>
-  </div>
-</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.8.13 -->
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+$(function() {
+  initMenu('',false,false,'search.php','Search');
+});
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
 <div id="side-nav" class="ui-resizable side-nav-resizable">
   <div id="nav-tree">
     <div id="nav-tree-contents">
+      <div id="nav-sync" class="sync"></div>
     </div>
   </div>
   <div id="splitbar" style="-moz-user-select:none;" 
@@ -68,7 +55,7 @@
   </div>
 </div>
 <script type="text/javascript">
-  initNavTree('SpectralCentroid_8cpp.html','');
+$(document).ready(function(){initNavTree('SpectralCentroid_8cpp_source.html','');});
 </script>
 <div id="doc-content">
 <div class="header">
@@ -76,214 +63,52 @@
 <div class="title">SpectralCentroid.cpp</div>  </div>
 </div><!--header-->
 <div class="contents">
-<a href="SpectralCentroid_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/* -*- c-basic-offset: 4 indent-tabs-mode: nil -*-  vi:set ts=8 sts=4 sw=4: */</span>
-<a name="l00002"></a>00002 
-<a name="l00003"></a>00003 <span class="comment">/*</span>
-<a name="l00004"></a>00004 <span class="comment">    Vamp</span>
-<a name="l00005"></a>00005 <span class="comment"></span>
-<a name="l00006"></a>00006 <span class="comment">    An API for audio analysis and feature extraction plugins.</span>
-<a name="l00007"></a>00007 <span class="comment"></span>
-<a name="l00008"></a>00008 <span class="comment">    Centre for Digital Music, Queen Mary, University of London.</span>
-<a name="l00009"></a>00009 <span class="comment">    Copyright 2006 Chris Cannam.</span>
-<a name="l00010"></a>00010 <span class="comment">  </span>
-<a name="l00011"></a>00011 <span class="comment">    Permission is hereby granted, free of charge, to any person</span>
-<a name="l00012"></a>00012 <span class="comment">    obtaining a copy of this software and associated documentation</span>
-<a name="l00013"></a>00013 <span class="comment">    files (the &quot;Software&quot;), to deal in the Software without</span>
-<a name="l00014"></a>00014 <span class="comment">    restriction, including without limitation the rights to use, copy,</span>
-<a name="l00015"></a>00015 <span class="comment">    modify, merge, publish, distribute, sublicense, and/or sell copies</span>
-<a name="l00016"></a>00016 <span class="comment">    of the Software, and to permit persons to whom the Software is</span>
-<a name="l00017"></a>00017 <span class="comment">    furnished to do so, subject to the following conditions:</span>
-<a name="l00018"></a>00018 <span class="comment"></span>
-<a name="l00019"></a>00019 <span class="comment">    The above copyright notice and this permission notice shall be</span>
-<a name="l00020"></a>00020 <span class="comment">    included in all copies or substantial portions of the Software.</span>
-<a name="l00021"></a>00021 <span class="comment"></span>
-<a name="l00022"></a>00022 <span class="comment">    THE SOFTWARE IS PROVIDED &quot;AS IS&quot;, WITHOUT WARRANTY OF ANY KIND,</span>
-<a name="l00023"></a>00023 <span class="comment">    EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF</span>
-<a name="l00024"></a>00024 <span class="comment">    MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND</span>
-<a name="l00025"></a>00025 <span class="comment">    NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR</span>
-<a name="l00026"></a>00026 <span class="comment">    ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF</span>
-<a name="l00027"></a>00027 <span class="comment">    CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION</span>
-<a name="l00028"></a>00028 <span class="comment">    WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.</span>
-<a name="l00029"></a>00029 <span class="comment"></span>
-<a name="l00030"></a>00030 <span class="comment">    Except as contained in this notice, the names of the Centre for</span>
-<a name="l00031"></a>00031 <span class="comment">    Digital Music; Queen Mary, University of London; and Chris Cannam</span>
-<a name="l00032"></a>00032 <span class="comment">    shall not be used in advertising or otherwise to promote the sale,</span>
-<a name="l00033"></a>00033 <span class="comment">    use or other dealings in this Software without prior written</span>
-<a name="l00034"></a>00034 <span class="comment">    authorization.</span>
-<a name="l00035"></a>00035 <span class="comment">*/</span>
-<a name="l00036"></a>00036 
-<a name="l00037"></a>00037 <span class="preprocessor">#include &quot;<a class="code" href="SpectralCentroid_8h.html">SpectralCentroid.h</a>&quot;</span>
-<a name="l00038"></a>00038 
-<a name="l00039"></a>00039 <span class="keyword">using</span> std::string;
-<a name="l00040"></a>00040 <span class="keyword">using</span> std::vector;
-<a name="l00041"></a>00041 <span class="keyword">using</span> std::cerr;
-<a name="l00042"></a>00042 <span class="keyword">using</span> std::endl;
-<a name="l00043"></a>00043 
-<a name="l00044"></a>00044 <span class="preprocessor">#include &lt;math.h&gt;</span>
-<a name="l00045"></a>00045 
-<a name="l00046"></a>00046 <span class="preprocessor">#ifdef __SUNPRO_CC</span>
-<a name="l00047"></a>00047 <span class="preprocessor"></span><span class="preprocessor">#include &lt;ieeefp.h&gt;</span>
-<a name="l00048"></a>00048 <span class="preprocessor">#define isinf(x) (!finite(x))</span>
-<a name="l00049"></a>00049 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
-<a name="l00050"></a>00050 <span class="preprocessor"></span>
-<a name="l00051"></a>00051 <span class="preprocessor">#ifdef WIN32</span>
-<a name="l00052"></a>00052 <span class="preprocessor"></span><span class="preprocessor">#define isnan(x) false</span>
-<a name="l00053"></a>00053 <span class="preprocessor"></span><span class="preprocessor">#define isinf(x) false</span>
-<a name="l00054"></a>00054 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
-<a name="l00055"></a>00055 <span class="preprocessor"></span>
-<a name="l00056"></a><a class="code" href="classSpectralCentroid.html#a2cd801ad72f262eceb95ab0d22e7dbcd">00056</a> <a class="code" href="classSpectralCentroid.html#a2cd801ad72f262eceb95ab0d22e7dbcd">SpectralCentroid::SpectralCentroid</a>(<span class="keywordtype">float</span> inputSampleRate) :
-<a name="l00057"></a>00057     Plugin(inputSampleRate),
-<a name="l00058"></a>00058     m_stepSize(0),
-<a name="l00059"></a>00059     m_blockSize(0)
-<a name="l00060"></a>00060 {
-<a name="l00061"></a>00061 }
-<a name="l00062"></a>00062 
-<a name="l00063"></a><a class="code" href="classSpectralCentroid.html#a483e0d6757bc3dcf61e8066f764f45c6">00063</a> <a class="code" href="classSpectralCentroid.html#a483e0d6757bc3dcf61e8066f764f45c6">SpectralCentroid::~SpectralCentroid</a>()
-<a name="l00064"></a>00064 {
-<a name="l00065"></a>00065 }
-<a name="l00066"></a>00066 
-<a name="l00067"></a>00067 <span class="keywordtype">string</span>
-<a name="l00068"></a><a class="code" href="classSpectralCentroid.html#a1b2c4c8440c024c4c635fcef5697949f">00068</a> <a class="code" href="classSpectralCentroid.html#a1b2c4c8440c024c4c635fcef5697949f" title="Get the computer-usable name of the plugin.">SpectralCentroid::getIdentifier</a>()<span class="keyword"> const</span>
-<a name="l00069"></a>00069 <span class="keyword"></span>{
-<a name="l00070"></a>00070     <span class="keywordflow">return</span> <span class="stringliteral">&quot;spectralcentroid&quot;</span>;
-<a name="l00071"></a>00071 }
-<a name="l00072"></a>00072 
-<a name="l00073"></a>00073 <span class="keywordtype">string</span>
-<a name="l00074"></a><a class="code" href="classSpectralCentroid.html#ab7e6a620fea568af431be3cfd9dd5a41">00074</a> <a class="code" href="classSpectralCentroid.html#ab7e6a620fea568af431be3cfd9dd5a41" title="Get a human-readable name or title of the plugin.">SpectralCentroid::getName</a>()<span class="keyword"> const</span>
-<a name="l00075"></a>00075 <span class="keyword"></span>{
-<a name="l00076"></a>00076     <span class="keywordflow">return</span> <span class="stringliteral">&quot;Spectral Centroid&quot;</span>;
-<a name="l00077"></a>00077 }
-<a name="l00078"></a>00078 
-<a name="l00079"></a>00079 <span class="keywordtype">string</span>
-<a name="l00080"></a><a class="code" href="classSpectralCentroid.html#a8fbb74a46283057d9a0b0e4718ee943c">00080</a> <a class="code" href="classSpectralCentroid.html#a8fbb74a46283057d9a0b0e4718ee943c" title="Get a human-readable description for the plugin, typically a line of text that may optionally be disp...">SpectralCentroid::getDescription</a>()<span class="keyword"> const</span>
-<a name="l00081"></a>00081 <span class="keyword"></span>{
-<a name="l00082"></a>00082     <span class="keywordflow">return</span> <span class="stringliteral">&quot;Calculate the centroid frequency of the spectrum of the input signal&quot;</span>;
-<a name="l00083"></a>00083 }
-<a name="l00084"></a>00084 
-<a name="l00085"></a>00085 <span class="keywordtype">string</span>
-<a name="l00086"></a><a class="code" href="classSpectralCentroid.html#ac01ff858bf67e2e93ad5d24a6ba8c8c8">00086</a> <a class="code" href="classSpectralCentroid.html#ac01ff858bf67e2e93ad5d24a6ba8c8c8" title="Get the name of the author or vendor of the plugin in human-readable form.">SpectralCentroid::getMaker</a>()<span class="keyword"> const</span>
-<a name="l00087"></a>00087 <span class="keyword"></span>{
-<a name="l00088"></a>00088     <span class="keywordflow">return</span> <span class="stringliteral">&quot;Vamp SDK Example Plugins&quot;</span>;
-<a name="l00089"></a>00089 }
-<a name="l00090"></a>00090 
-<a name="l00091"></a>00091 <span class="keywordtype">int</span>
-<a name="l00092"></a><a class="code" href="classSpectralCentroid.html#af64622e66bf678ac2b0b58aa832ca2b3">00092</a> <a class="code" href="classSpectralCentroid.html#af64622e66bf678ac2b0b58aa832ca2b3" title="Get the version number of the plugin.">SpectralCentroid::getPluginVersion</a>()<span class="keyword"> const</span>
-<a name="l00093"></a>00093 <span class="keyword"></span>{
-<a name="l00094"></a>00094     <span class="keywordflow">return</span> 2;
-<a name="l00095"></a>00095 }
-<a name="l00096"></a>00096 
-<a name="l00097"></a>00097 <span class="keywordtype">string</span>
-<a name="l00098"></a><a class="code" href="classSpectralCentroid.html#a925747d513d598e0fa21ed0ed6520980">00098</a> <a class="code" href="classSpectralCentroid.html#a925747d513d598e0fa21ed0ed6520980" title="Get the copyright statement or licensing summary for the plugin.">SpectralCentroid::getCopyright</a>()<span class="keyword"> const</span>
-<a name="l00099"></a>00099 <span class="keyword"></span>{
-<a name="l00100"></a>00100     <span class="keywordflow">return</span> <span class="stringliteral">&quot;Freely redistributable (BSD license)&quot;</span>;
-<a name="l00101"></a>00101 }
-<a name="l00102"></a>00102 
-<a name="l00103"></a>00103 <span class="keywordtype">bool</span>
-<a name="l00104"></a><a class="code" href="classSpectralCentroid.html#aab1ae16f5c68e2b319668f447908cedb">00104</a> <a class="code" href="classSpectralCentroid.html#aab1ae16f5c68e2b319668f447908cedb" title="Initialise a plugin to prepare it for use with the given number of input channels, step size (window increment, in sample frames) and block size (window size, in sample frames).">SpectralCentroid::initialise</a>(<span class="keywordtype">size_t</span> channels, <span class="keywordtype">size_t</span> stepSize, <span class="keywordtype">size_t</span> blockSize)
-<a name="l00105"></a>00105 {
-<a name="l00106"></a>00106     <span class="keywordflow">if</span> (channels &lt; <a class="code" href="classVamp_1_1Plugin.html#a267b42e866df3cf0d190893e8096f525" title="Get the minimum supported number of input channels.">getMinChannelCount</a>() ||
-<a name="l00107"></a>00107         channels &gt; <a class="code" href="classVamp_1_1Plugin.html#a2c5ab12b6fa4847cb244bd1e9cb3ae5e" title="Get the maximum supported number of input channels.">getMaxChannelCount</a>()) <span class="keywordflow">return</span> <span class="keyword">false</span>;
-<a name="l00108"></a>00108 
-<a name="l00109"></a>00109     <a class="code" href="classSpectralCentroid.html#a49805a090ba58477da4adbefea4392a7">m_stepSize</a> = stepSize;
-<a name="l00110"></a>00110     <a class="code" href="classSpectralCentroid.html#a262f583d71b442bb2d80023e7c85aa4e">m_blockSize</a> = blockSize;
-<a name="l00111"></a>00111 
-<a name="l00112"></a>00112     <span class="keywordflow">return</span> <span class="keyword">true</span>;
-<a name="l00113"></a>00113 }
-<a name="l00114"></a>00114 
-<a name="l00115"></a>00115 <span class="keywordtype">void</span>
-<a name="l00116"></a><a class="code" href="classSpectralCentroid.html#a9b5f5581691ff8f46bb7674d8d74395c">00116</a> <a class="code" href="classSpectralCentroid.html#a9b5f5581691ff8f46bb7674d8d74395c" title="Reset the plugin after use, to prepare it for another clean run.">SpectralCentroid::reset</a>()
-<a name="l00117"></a>00117 {
-<a name="l00118"></a>00118 }
-<a name="l00119"></a>00119 
-<a name="l00120"></a>00120 <a class="code" href="classVamp_1_1Plugin.html#a30f531b8fb69fac41a24e3d2a6a08ed9">SpectralCentroid::OutputList</a>
-<a name="l00121"></a><a class="code" href="classSpectralCentroid.html#a894ca9740927102bb80b56b5e9e95877">00121</a> <a class="code" href="classSpectralCentroid.html#a894ca9740927102bb80b56b5e9e95877" title="Get the outputs of this plugin.">SpectralCentroid::getOutputDescriptors</a>()<span class="keyword"> const</span>
-<a name="l00122"></a>00122 <span class="keyword"></span>{
-<a name="l00123"></a>00123     <a class="code" href="classVamp_1_1Plugin.html#a30f531b8fb69fac41a24e3d2a6a08ed9">OutputList</a> list;
-<a name="l00124"></a>00124 
-<a name="l00125"></a>00125     <a class="code" href="structVamp_1_1Plugin_1_1OutputDescriptor.html">OutputDescriptor</a> d;
-<a name="l00126"></a>00126     d.<a class="code" href="structVamp_1_1Plugin_1_1OutputDescriptor.html#ae2c893ddb1860589517ab7eaa989a18b" title="The name of the output, in computer-usable form.">identifier</a> = <span class="stringliteral">&quot;logcentroid&quot;</span>;
-<a name="l00127"></a>00127     d.<a class="code" href="structVamp_1_1Plugin_1_1OutputDescriptor.html#ab824b2b34ee50f897a30901c620e8d87" title="The human-readable name of the output.">name</a> = <span class="stringliteral">&quot;Log Frequency Centroid&quot;</span>;
-<a name="l00128"></a>00128     d.<a class="code" href="structVamp_1_1Plugin_1_1OutputDescriptor.html#af9b4fe8f78e7126ead820ba5dc55efd1" title="A human-readable short text describing the output.">description</a> = <span class="stringliteral">&quot;Centroid of the log weighted frequency spectrum&quot;</span>;
-<a name="l00129"></a>00129     d.<a class="code" href="structVamp_1_1Plugin_1_1OutputDescriptor.html#aa057a8833fa037f06ac9f7b85b85d5e4" title="The unit of the output, in human-readable form.">unit</a> = <span class="stringliteral">&quot;Hz&quot;</span>;
-<a name="l00130"></a>00130     d.<a class="code" href="structVamp_1_1Plugin_1_1OutputDescriptor.html#af0e577e1a256ff6eed6ea42133fec77d" title="True if the output has the same number of values per sample for every output sample.">hasFixedBinCount</a> = <span class="keyword">true</span>;
-<a name="l00131"></a>00131     d.<a class="code" href="structVamp_1_1Plugin_1_1OutputDescriptor.html#afdd006959a995e40ef7d565a3a4df6dc" title="The number of values per result of the output.">binCount</a> = 1;
-<a name="l00132"></a>00132     d.<a class="code" href="structVamp_1_1Plugin_1_1OutputDescriptor.html#ae9ccb65f99f477096b65dd031f4c5e31" title="True if the results in each output bin fall within a fixed numeric range (minimum and maximum values)...">hasKnownExtents</a> = <span class="keyword">false</span>;
-<a name="l00133"></a>00133     d.<a class="code" href="structVamp_1_1Plugin_1_1OutputDescriptor.html#a1b4858928d23bfd7d5bc557c82a83fb4" title="True if the output values are quantized to a particular resolution.">isQuantized</a> = <span class="keyword">false</span>;
-<a name="l00134"></a>00134     d.<a class="code" href="structVamp_1_1Plugin_1_1OutputDescriptor.html#a0d1194980d44e31b25ef3b4b070d6b5d" title="Positioning in time of the output results.">sampleType</a> = <a class="code" href="structVamp_1_1Plugin_1_1OutputDescriptor.html#abffa9ed50cd756df70fd51f0355f448ca0459d5d0d2198d21e8bc90abe4fdccca" title="Results from each process() align with that call&#39;s block start.">OutputDescriptor::OneSamplePerStep</a>;
-<a name="l00135"></a>00135     list.push_back(d);
-<a name="l00136"></a>00136 
-<a name="l00137"></a>00137     d.<a class="code" href="structVamp_1_1Plugin_1_1OutputDescriptor.html#ae2c893ddb1860589517ab7eaa989a18b" title="The name of the output, in computer-usable form.">identifier</a> = <span class="stringliteral">&quot;linearcentroid&quot;</span>;
-<a name="l00138"></a>00138     d.<a class="code" href="structVamp_1_1Plugin_1_1OutputDescriptor.html#ab824b2b34ee50f897a30901c620e8d87" title="The human-readable name of the output.">name</a> = <span class="stringliteral">&quot;Linear Frequency Centroid&quot;</span>;
-<a name="l00139"></a>00139     d.<a class="code" href="structVamp_1_1Plugin_1_1OutputDescriptor.html#af9b4fe8f78e7126ead820ba5dc55efd1" title="A human-readable short text describing the output.">description</a> = <span class="stringliteral">&quot;Centroid of the linear frequency spectrum&quot;</span>;
-<a name="l00140"></a>00140     list.push_back(d);
-<a name="l00141"></a>00141 
-<a name="l00142"></a>00142     <span class="keywordflow">return</span> list;
-<a name="l00143"></a>00143 }
-<a name="l00144"></a>00144 
-<a name="l00145"></a>00145 <a class="code" href="classVamp_1_1Plugin.html#a448fb57dc245d47923ec9eeaf9856c5f">SpectralCentroid::FeatureSet</a>
-<a name="l00146"></a><a class="code" href="classSpectralCentroid.html#aca96c70e7e75c9e4a7db38485018914c">00146</a> <a class="code" href="classSpectralCentroid.html#aca96c70e7e75c9e4a7db38485018914c" title="Process a single block of input data.">SpectralCentroid::process</a>(<span class="keyword">const</span> <span class="keywordtype">float</span> *<span class="keyword">const</span> *inputBuffers, <a class="code" href="structVamp_1_1RealTime.html" title="RealTime represents time values to nanosecond precision with accurate arithmetic and frame-rate conve...">Vamp::RealTime</a> timestamp)
-<a name="l00147"></a>00147 {
-<a name="l00148"></a>00148     <span class="keywordflow">if</span> (<a class="code" href="classSpectralCentroid.html#a49805a090ba58477da4adbefea4392a7">m_stepSize</a> == 0) {
-<a name="l00149"></a>00149         cerr &lt;&lt; <span class="stringliteral">&quot;ERROR: SpectralCentroid::process: &quot;</span>
-<a name="l00150"></a>00150              &lt;&lt; <span class="stringliteral">&quot;SpectralCentroid has not been initialised&quot;</span>
-<a name="l00151"></a>00151              &lt;&lt; endl;
-<a name="l00152"></a>00152         <span class="keywordflow">return</span> <a class="code" href="classVamp_1_1Plugin.html#a448fb57dc245d47923ec9eeaf9856c5f">FeatureSet</a>();
-<a name="l00153"></a>00153     }
-<a name="l00154"></a>00154 
-<a name="l00155"></a>00155     <span class="keywordtype">double</span> numLin = 0.0, numLog = 0.0, denom = 0.0;
-<a name="l00156"></a>00156 
-<a name="l00157"></a>00157     <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = 1; i &lt;= <a class="code" href="classSpectralCentroid.html#a262f583d71b442bb2d80023e7c85aa4e">m_blockSize</a>/2; ++i) {
-<a name="l00158"></a>00158         <span class="keywordtype">double</span> freq = (double(i) * <a class="code" href="classVamp_1_1Plugin.html#a59b9dd82a4f4eb946cd0474cc81abc23">m_inputSampleRate</a>) / <a class="code" href="classSpectralCentroid.html#a262f583d71b442bb2d80023e7c85aa4e">m_blockSize</a>;
-<a name="l00159"></a>00159         <span class="keywordtype">double</span> real = inputBuffers[0][i*2];
-<a name="l00160"></a>00160         <span class="keywordtype">double</span> imag = inputBuffers[0][i*2 + 1];
-<a name="l00161"></a>00161         <span class="keywordtype">double</span> scalemag = sqrt(real * real + imag * imag) / (<a class="code" href="classSpectralCentroid.html#a262f583d71b442bb2d80023e7c85aa4e">m_blockSize</a>/2);
-<a name="l00162"></a>00162         numLin += freq * scalemag;
-<a name="l00163"></a>00163         numLog += log10f(freq) * scalemag;
-<a name="l00164"></a>00164         denom += scalemag;
-<a name="l00165"></a>00165     }
-<a name="l00166"></a>00166 
-<a name="l00167"></a>00167     <a class="code" href="classVamp_1_1Plugin.html#a448fb57dc245d47923ec9eeaf9856c5f">FeatureSet</a> returnFeatures;
-<a name="l00168"></a>00168 
-<a name="l00169"></a>00169     <span class="keywordflow">if</span> (denom != 0.0) {
-<a name="l00170"></a>00170         <span class="keywordtype">float</span> centroidLin = float(numLin / denom);
-<a name="l00171"></a>00171         <span class="keywordtype">float</span> centroidLog = powf(10, <span class="keywordtype">float</span>(numLog / denom));
-<a name="l00172"></a>00172 
-<a name="l00173"></a>00173         <a class="code" href="structVamp_1_1Plugin_1_1Feature.html">Feature</a> feature;
-<a name="l00174"></a>00174         feature.<a class="code" href="structVamp_1_1Plugin_1_1Feature.html#a98907091d0b6a589720ae35ae588a82b" title="True if an output feature has its own timestamp.">hasTimestamp</a> = <span class="keyword">false</span>;
-<a name="l00175"></a>00175 
-<a name="l00176"></a>00176         <span class="keywordflow">if</span> (!isnan(centroidLog) &amp;&amp; !isinf(centroidLog)) {
-<a name="l00177"></a>00177             feature.<a class="code" href="structVamp_1_1Plugin_1_1Feature.html#a60b9f3057386820dbcaec0eb1189ce71" title="Results for a single sample of this feature.">values</a>.push_back(centroidLog);
-<a name="l00178"></a>00178         }
-<a name="l00179"></a>00179         returnFeatures[0].push_back(feature);
-<a name="l00180"></a>00180 
-<a name="l00181"></a>00181         feature.<a class="code" href="structVamp_1_1Plugin_1_1Feature.html#a60b9f3057386820dbcaec0eb1189ce71" title="Results for a single sample of this feature.">values</a>.clear();
-<a name="l00182"></a>00182         <span class="keywordflow">if</span> (!isnan(centroidLin) &amp;&amp; !isinf(centroidLin)) {
-<a name="l00183"></a>00183             feature.<a class="code" href="structVamp_1_1Plugin_1_1Feature.html#a60b9f3057386820dbcaec0eb1189ce71" title="Results for a single sample of this feature.">values</a>.push_back(centroidLin);
-<a name="l00184"></a>00184         }
-<a name="l00185"></a>00185         returnFeatures[1].push_back(feature);
-<a name="l00186"></a>00186     }
-<a name="l00187"></a>00187 
-<a name="l00188"></a>00188     <span class="keywordflow">return</span> returnFeatures;
-<a name="l00189"></a>00189 }
-<a name="l00190"></a>00190 
-<a name="l00191"></a>00191 <a class="code" href="classVamp_1_1Plugin.html#a448fb57dc245d47923ec9eeaf9856c5f">SpectralCentroid::FeatureSet</a>
-<a name="l00192"></a><a class="code" href="classSpectralCentroid.html#a83ba39f0870a2f86837605a958dfab1a">00192</a> <a class="code" href="classSpectralCentroid.html#a83ba39f0870a2f86837605a958dfab1a" title="After all blocks have been processed, calculate and return any remaining features derived from the co...">SpectralCentroid::getRemainingFeatures</a>()
-<a name="l00193"></a>00193 {
-<a name="l00194"></a>00194     <span class="keywordflow">return</span> <a class="code" href="classVamp_1_1Plugin.html#a448fb57dc245d47923ec9eeaf9856c5f">FeatureSet</a>();
-<a name="l00195"></a>00195 }
-<a name="l00196"></a>00196 
-</pre></div></div><!-- contents -->
+<a href="SpectralCentroid_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="comment">/* -*- c-basic-offset: 4 indent-tabs-mode: nil -*-  vi:set ts=8 sts=4 sw=4: */</span></div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;</div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="comment">/*</span></div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="comment">    Vamp</span></div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment"></span></div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="comment">    An API for audio analysis and feature extraction plugins.</span></div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="comment"></span></div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="comment">    Centre for Digital Music, Queen Mary, University of London.</span></div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="comment">    Copyright 2006 Chris Cannam.</span></div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="comment">  </span></div><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="comment">    Permission is hereby granted, free of charge, to any person</span></div><div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="comment">    obtaining a copy of this software and associated documentation</span></div><div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="comment">    files (the &quot;Software&quot;), to deal in the Software without</span></div><div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="comment">    restriction, including without limitation the rights to use, copy,</span></div><div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="comment">    modify, merge, publish, distribute, sublicense, and/or sell copies</span></div><div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;<span class="comment">    of the Software, and to permit persons to whom the Software is</span></div><div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;<span class="comment">    furnished to do so, subject to the following conditions:</span></div><div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;<span class="comment"></span></div><div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;<span class="comment">    The above copyright notice and this permission notice shall be</span></div><div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;<span class="comment">    included in all copies or substantial portions of the Software.</span></div><div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;<span class="comment"></span></div><div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;<span class="comment">    THE SOFTWARE IS PROVIDED &quot;AS IS&quot;, WITHOUT WARRANTY OF ANY KIND,</span></div><div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;<span class="comment">    EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF</span></div><div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;<span class="comment">    MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND</span></div><div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;<span class="comment">    NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR</span></div><div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;<span class="comment">    ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF</span></div><div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;<span class="comment">    CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION</span></div><div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;<span class="comment">    WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.</span></div><div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;<span class="comment"></span></div><div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;<span class="comment">    Except as contained in this notice, the names of the Centre for</span></div><div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;<span class="comment">    Digital Music; Queen Mary, University of London; and Chris Cannam</span></div><div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;<span class="comment">    shall not be used in advertising or otherwise to promote the sale,</span></div><div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;<span class="comment">    use or other dealings in this Software without prior written</span></div><div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;<span class="comment">    authorization.</span></div><div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;<span class="comment">*/</span></div><div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;</div><div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="SpectralCentroid_8h.html">SpectralCentroid.h</a>&quot;</span></div><div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;</div><div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;<span class="keyword">using</span> std::string;</div><div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;<span class="keyword">using</span> std::vector;</div><div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;<span class="keyword">using</span> std::cerr;</div><div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;<span class="keyword">using</span> std::endl;</div><div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;</div><div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;<span class="preprocessor">#include &lt;math.h&gt;</span></div><div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;</div><div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;<span class="preprocessor">#ifdef __SUNPRO_CC</span></div><div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;<span class="preprocessor">#include &lt;ieeefp.h&gt;</span></div><div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;<span class="preprocessor">#define isinf(x) (!finite(x))</span></div><div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;</div><div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;<span class="preprocessor">#ifdef WIN32</span></div><div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;<span class="preprocessor">#define isnan(x) false</span></div><div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;<span class="preprocessor">#define isinf(x) false</span></div><div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;</div><div class="line"><a name="l00056"></a><span class="lineno"><a class="line" href="classSpectralCentroid.html#a2cd801ad72f262eceb95ab0d22e7dbcd">   56</a></span>&#160;<a class="code" href="classSpectralCentroid.html#a2cd801ad72f262eceb95ab0d22e7dbcd">SpectralCentroid::SpectralCentroid</a>(<span class="keywordtype">float</span> inputSampleRate) :</div><div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;    Plugin(inputSampleRate),</div><div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;    m_stepSize(0),</div><div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;    m_blockSize(0)</div><div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;{</div><div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;}</div><div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;</div><div class="line"><a name="l00063"></a><span class="lineno"><a class="line" href="classSpectralCentroid.html#a483e0d6757bc3dcf61e8066f764f45c6">   63</a></span>&#160;<a class="code" href="classSpectralCentroid.html#a483e0d6757bc3dcf61e8066f764f45c6">SpectralCentroid::~SpectralCentroid</a>()</div><div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;{</div><div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;}</div><div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;</div><div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;<span class="keywordtype">string</span></div><div class="line"><a name="l00068"></a><span class="lineno"><a class="line" href="classSpectralCentroid.html#a4992d03772a228015ee2f8174f1bf06e">   68</a></span>&#160;<a class="code" href="classSpectralCentroid.html#a4992d03772a228015ee2f8174f1bf06e">SpectralCentroid::getIdentifier</a>()<span class="keyword"> const</span></div><div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;<span class="keyword"></span>{</div><div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;    <span class="keywordflow">return</span> <span class="stringliteral">&quot;spectralcentroid&quot;</span>;</div><div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;}</div><div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;</div><div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;<span class="keywordtype">string</span></div><div class="line"><a name="l00074"></a><span class="lineno"><a class="line" href="classSpectralCentroid.html#aa6236ae7400468b8d23d57f8bbb917a9">   74</a></span>&#160;<a class="code" href="classSpectralCentroid.html#aa6236ae7400468b8d23d57f8bbb917a9">SpectralCentroid::getName</a>()<span class="keyword"> const</span></div><div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;<span class="keyword"></span>{</div><div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;    <span class="keywordflow">return</span> <span class="stringliteral">&quot;Spectral Centroid&quot;</span>;</div><div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;}</div><div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;</div><div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;<span class="keywordtype">string</span></div><div class="line"><a name="l00080"></a><span class="lineno"><a class="line" href="classSpectralCentroid.html#ac4a840f9b3c92e0acbcc7d262e841b59">   80</a></span>&#160;<a class="code" href="classSpectralCentroid.html#ac4a840f9b3c92e0acbcc7d262e841b59">SpectralCentroid::getDescription</a>()<span class="keyword"> const</span></div><div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;<span class="keyword"></span>{</div><div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;    <span class="keywordflow">return</span> <span class="stringliteral">&quot;Calculate the centroid frequency of the spectrum of the input signal&quot;</span>;</div><div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;}</div><div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;</div><div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;<span class="keywordtype">string</span></div><div class="line"><a name="l00086"></a><span class="lineno"><a class="line" href="classSpectralCentroid.html#a9bab5a013a818e286eb4894f9874fee1">   86</a></span>&#160;<a class="code" href="classSpectralCentroid.html#a9bab5a013a818e286eb4894f9874fee1">SpectralCentroid::getMaker</a>()<span class="keyword"> const</span></div><div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;<span class="keyword"></span>{</div><div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;    <span class="keywordflow">return</span> <span class="stringliteral">&quot;Vamp SDK Example Plugins&quot;</span>;</div><div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;}</div><div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;</div><div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;<span class="keywordtype">int</span></div><div class="line"><a name="l00092"></a><span class="lineno"><a class="line" href="classSpectralCentroid.html#a0056cd5e0615ce8766d52c0b7a92280e">   92</a></span>&#160;<a class="code" href="classSpectralCentroid.html#a0056cd5e0615ce8766d52c0b7a92280e">SpectralCentroid::getPluginVersion</a>()<span class="keyword"> const</span></div><div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;<span class="keyword"></span>{</div><div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;    <span class="keywordflow">return</span> 2;</div><div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;}</div><div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;</div><div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;<span class="keywordtype">string</span></div><div class="line"><a name="l00098"></a><span class="lineno"><a class="line" href="classSpectralCentroid.html#afbf8f44c5724cfc7b2b12102389f10b5">   98</a></span>&#160;<a class="code" href="classSpectralCentroid.html#afbf8f44c5724cfc7b2b12102389f10b5">SpectralCentroid::getCopyright</a>()<span class="keyword"> const</span></div><div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;<span class="keyword"></span>{</div><div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;    <span class="keywordflow">return</span> <span class="stringliteral">&quot;Freely redistributable (BSD license)&quot;</span>;</div><div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;}</div><div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;</div><div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;<span class="keywordtype">bool</span></div><div class="line"><a name="l00104"></a><span class="lineno"><a class="line" href="classSpectralCentroid.html#aab1ae16f5c68e2b319668f447908cedb">  104</a></span>&#160;<a class="code" href="classSpectralCentroid.html#aab1ae16f5c68e2b319668f447908cedb">SpectralCentroid::initialise</a>(<span class="keywordtype">size_t</span> channels, <span class="keywordtype">size_t</span> stepSize, <span class="keywordtype">size_t</span> blockSize)</div><div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;{</div><div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;    <span class="keywordflow">if</span> (channels &lt; <a class="code" href="classVamp_1_1Plugin.html#ab74f7634c6ac6e3da115667808a79c30">getMinChannelCount</a>() ||</div><div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;        channels &gt; <a class="code" href="classVamp_1_1Plugin.html#a0bff9464bc8c117470136c396b2405dd">getMaxChannelCount</a>()) <span class="keywordflow">return</span> <span class="keyword">false</span>;</div><div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;</div><div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;    <a class="code" href="classSpectralCentroid.html#a49805a090ba58477da4adbefea4392a7">m_stepSize</a> = stepSize;</div><div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;    <a class="code" href="classSpectralCentroid.html#a262f583d71b442bb2d80023e7c85aa4e">m_blockSize</a> = blockSize;</div><div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;</div><div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;    <span class="keywordflow">return</span> <span class="keyword">true</span>;</div><div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;}</div><div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;</div><div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;<span class="keywordtype">void</span></div><div class="line"><a name="l00116"></a><span class="lineno"><a class="line" href="classSpectralCentroid.html#a9b5f5581691ff8f46bb7674d8d74395c">  116</a></span>&#160;<a class="code" href="classSpectralCentroid.html#a9b5f5581691ff8f46bb7674d8d74395c">SpectralCentroid::reset</a>()</div><div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;{</div><div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;}</div><div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;</div><div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;<a class="code" href="classVamp_1_1Plugin.html#a30f531b8fb69fac41a24e3d2a6a08ed9">SpectralCentroid::OutputList</a></div><div class="line"><a name="l00121"></a><span class="lineno"><a class="line" href="classSpectralCentroid.html#af77b30128e071e99d0dd374a3b2fe928">  121</a></span>&#160;<a class="code" href="classSpectralCentroid.html#af77b30128e071e99d0dd374a3b2fe928">SpectralCentroid::getOutputDescriptors</a>()<span class="keyword"> const</span></div><div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160;<span class="keyword"></span>{</div><div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160;    <a class="code" href="classVamp_1_1Plugin.html#a30f531b8fb69fac41a24e3d2a6a08ed9">OutputList</a> list;</div><div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;</div><div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;    <a class="code" href="structVamp_1_1Plugin_1_1OutputDescriptor.html">OutputDescriptor</a> d;</div><div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160;    d.<a class="code" href="structVamp_1_1Plugin_1_1OutputDescriptor.html#ae2c893ddb1860589517ab7eaa989a18b">identifier</a> = <span class="stringliteral">&quot;logcentroid&quot;</span>;</div><div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160;    d.<a class="code" href="structVamp_1_1Plugin_1_1OutputDescriptor.html#ab824b2b34ee50f897a30901c620e8d87">name</a> = <span class="stringliteral">&quot;Log Frequency Centroid&quot;</span>;</div><div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160;    d.<a class="code" href="structVamp_1_1Plugin_1_1OutputDescriptor.html#af9b4fe8f78e7126ead820ba5dc55efd1">description</a> = <span class="stringliteral">&quot;Centroid of the log weighted frequency spectrum&quot;</span>;</div><div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160;    d.<a class="code" href="structVamp_1_1Plugin_1_1OutputDescriptor.html#aa057a8833fa037f06ac9f7b85b85d5e4">unit</a> = <span class="stringliteral">&quot;Hz&quot;</span>;</div><div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160;    d.<a class="code" href="structVamp_1_1Plugin_1_1OutputDescriptor.html#af0e577e1a256ff6eed6ea42133fec77d">hasFixedBinCount</a> = <span class="keyword">true</span>;</div><div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160;    d.<a class="code" href="structVamp_1_1Plugin_1_1OutputDescriptor.html#afdd006959a995e40ef7d565a3a4df6dc">binCount</a> = 1;</div><div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160;    d.<a class="code" href="structVamp_1_1Plugin_1_1OutputDescriptor.html#ae9ccb65f99f477096b65dd031f4c5e31">hasKnownExtents</a> = <span class="keyword">false</span>;</div><div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160;    d.<a class="code" href="structVamp_1_1Plugin_1_1OutputDescriptor.html#a1b4858928d23bfd7d5bc557c82a83fb4">isQuantized</a> = <span class="keyword">false</span>;</div><div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;    d.<a class="code" href="structVamp_1_1Plugin_1_1OutputDescriptor.html#a0d1194980d44e31b25ef3b4b070d6b5d">sampleType</a> = <a class="code" href="structVamp_1_1Plugin_1_1OutputDescriptor.html#abffa9ed50cd756df70fd51f0355f448ca0459d5d0d2198d21e8bc90abe4fdccca">OutputDescriptor::OneSamplePerStep</a>;</div><div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160;    list.push_back(d);</div><div class="line"><a name="l00136"></a><span class="lineno">  136</span>&#160;</div><div class="line"><a name="l00137"></a><span class="lineno">  137</span>&#160;    d.<a class="code" href="structVamp_1_1Plugin_1_1OutputDescriptor.html#ae2c893ddb1860589517ab7eaa989a18b">identifier</a> = <span class="stringliteral">&quot;linearcentroid&quot;</span>;</div><div class="line"><a name="l00138"></a><span class="lineno">  138</span>&#160;    d.<a class="code" href="structVamp_1_1Plugin_1_1OutputDescriptor.html#ab824b2b34ee50f897a30901c620e8d87">name</a> = <span class="stringliteral">&quot;Linear Frequency Centroid&quot;</span>;</div><div class="line"><a name="l00139"></a><span class="lineno">  139</span>&#160;    d.<a class="code" href="structVamp_1_1Plugin_1_1OutputDescriptor.html#af9b4fe8f78e7126ead820ba5dc55efd1">description</a> = <span class="stringliteral">&quot;Centroid of the linear frequency spectrum&quot;</span>;</div><div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160;    list.push_back(d);</div><div class="line"><a name="l00141"></a><span class="lineno">  141</span>&#160;</div><div class="line"><a name="l00142"></a><span class="lineno">  142</span>&#160;    <span class="keywordflow">return</span> list;</div><div class="line"><a name="l00143"></a><span class="lineno">  143</span>&#160;}</div><div class="line"><a name="l00144"></a><span class="lineno">  144</span>&#160;</div><div class="line"><a name="l00145"></a><span class="lineno">  145</span>&#160;<a class="code" href="classVamp_1_1Plugin.html#a448fb57dc245d47923ec9eeaf9856c5f">SpectralCentroid::FeatureSet</a></div><div class="line"><a name="l00146"></a><span class="lineno"><a class="line" href="classSpectralCentroid.html#aca96c70e7e75c9e4a7db38485018914c">  146</a></span>&#160;<a class="code" href="classSpectralCentroid.html#aca96c70e7e75c9e4a7db38485018914c">SpectralCentroid::process</a>(<span class="keyword">const</span> <span class="keywordtype">float</span> *<span class="keyword">const</span> *inputBuffers, <a class="code" href="structVamp_1_1RealTime.html">Vamp::RealTime</a>)</div><div class="line"><a name="l00147"></a><span class="lineno">  147</span>&#160;{</div><div class="line"><a name="l00148"></a><span class="lineno">  148</span>&#160;    <span class="keywordflow">if</span> (<a class="code" href="classSpectralCentroid.html#a49805a090ba58477da4adbefea4392a7">m_stepSize</a> == 0) {</div><div class="line"><a name="l00149"></a><span class="lineno">  149</span>&#160;        cerr &lt;&lt; <span class="stringliteral">&quot;ERROR: SpectralCentroid::process: &quot;</span></div><div class="line"><a name="l00150"></a><span class="lineno">  150</span>&#160;             &lt;&lt; <span class="stringliteral">&quot;SpectralCentroid has not been initialised&quot;</span></div><div class="line"><a name="l00151"></a><span class="lineno">  151</span>&#160;             &lt;&lt; endl;</div><div class="line"><a name="l00152"></a><span class="lineno">  152</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="classVamp_1_1Plugin.html#a448fb57dc245d47923ec9eeaf9856c5f">FeatureSet</a>();</div><div class="line"><a name="l00153"></a><span class="lineno">  153</span>&#160;    }</div><div class="line"><a name="l00154"></a><span class="lineno">  154</span>&#160;</div><div class="line"><a name="l00155"></a><span class="lineno">  155</span>&#160;    <span class="keywordtype">double</span> numLin = 0.0, numLog = 0.0, denom = 0.0;</div><div class="line"><a name="l00156"></a><span class="lineno">  156</span>&#160;</div><div class="line"><a name="l00157"></a><span class="lineno">  157</span>&#160;    <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = 1; i &lt;= <a class="code" href="classSpectralCentroid.html#a262f583d71b442bb2d80023e7c85aa4e">m_blockSize</a>/2; ++i) {</div><div class="line"><a name="l00158"></a><span class="lineno">  158</span>&#160;        <span class="keywordtype">double</span> freq = (double(i) * <a class="code" href="classVamp_1_1Plugin.html#a59b9dd82a4f4eb946cd0474cc81abc23">m_inputSampleRate</a>) / <a class="code" href="classSpectralCentroid.html#a262f583d71b442bb2d80023e7c85aa4e">m_blockSize</a>;</div><div class="line"><a name="l00159"></a><span class="lineno">  159</span>&#160;        <span class="keywordtype">double</span> real = inputBuffers[0][i*2];</div><div class="line"><a name="l00160"></a><span class="lineno">  160</span>&#160;        <span class="keywordtype">double</span> imag = inputBuffers[0][i*2 + 1];</div><div class="line"><a name="l00161"></a><span class="lineno">  161</span>&#160;        <span class="keywordtype">double</span> scalemag = sqrt(real * real + imag * imag) / (<a class="code" href="classSpectralCentroid.html#a262f583d71b442bb2d80023e7c85aa4e">m_blockSize</a>/2);</div><div class="line"><a name="l00162"></a><span class="lineno">  162</span>&#160;        numLin += freq * scalemag;</div><div class="line"><a name="l00163"></a><span class="lineno">  163</span>&#160;        numLog += log10f(freq) * scalemag;</div><div class="line"><a name="l00164"></a><span class="lineno">  164</span>&#160;        denom += scalemag;</div><div class="line"><a name="l00165"></a><span class="lineno">  165</span>&#160;    }</div><div class="line"><a name="l00166"></a><span class="lineno">  166</span>&#160;</div><div class="line"><a name="l00167"></a><span class="lineno">  167</span>&#160;    <a class="code" href="classVamp_1_1Plugin.html#a448fb57dc245d47923ec9eeaf9856c5f">FeatureSet</a> returnFeatures;</div><div class="line"><a name="l00168"></a><span class="lineno">  168</span>&#160;</div><div class="line"><a name="l00169"></a><span class="lineno">  169</span>&#160;    <span class="keywordflow">if</span> (denom != 0.0) {</div><div class="line"><a name="l00170"></a><span class="lineno">  170</span>&#160;        <span class="keywordtype">float</span> centroidLin = float(numLin / denom);</div><div class="line"><a name="l00171"></a><span class="lineno">  171</span>&#160;        <span class="keywordtype">float</span> centroidLog = powf(10, <span class="keywordtype">float</span>(numLog / denom));</div><div class="line"><a name="l00172"></a><span class="lineno">  172</span>&#160;</div><div class="line"><a name="l00173"></a><span class="lineno">  173</span>&#160;        <a class="code" href="structVamp_1_1Plugin_1_1Feature.html">Feature</a> feature;</div><div class="line"><a name="l00174"></a><span class="lineno">  174</span>&#160;        feature.<a class="code" href="structVamp_1_1Plugin_1_1Feature.html#a98907091d0b6a589720ae35ae588a82b">hasTimestamp</a> = <span class="keyword">false</span>;</div><div class="line"><a name="l00175"></a><span class="lineno">  175</span>&#160;</div><div class="line"><a name="l00176"></a><span class="lineno">  176</span>&#160;        <span class="keywordflow">if</span> (!isnan(centroidLog) &amp;&amp; !isinf(centroidLog)) {</div><div class="line"><a name="l00177"></a><span class="lineno">  177</span>&#160;            feature.<a class="code" href="structVamp_1_1Plugin_1_1Feature.html#a60b9f3057386820dbcaec0eb1189ce71">values</a>.push_back(centroidLog);</div><div class="line"><a name="l00178"></a><span class="lineno">  178</span>&#160;        }</div><div class="line"><a name="l00179"></a><span class="lineno">  179</span>&#160;        returnFeatures[0].push_back(feature);</div><div class="line"><a name="l00180"></a><span class="lineno">  180</span>&#160;</div><div class="line"><a name="l00181"></a><span class="lineno">  181</span>&#160;        feature.<a class="code" href="structVamp_1_1Plugin_1_1Feature.html#a60b9f3057386820dbcaec0eb1189ce71">values</a>.clear();</div><div class="line"><a name="l00182"></a><span class="lineno">  182</span>&#160;        <span class="keywordflow">if</span> (!isnan(centroidLin) &amp;&amp; !isinf(centroidLin)) {</div><div class="line"><a name="l00183"></a><span class="lineno">  183</span>&#160;            feature.<a class="code" href="structVamp_1_1Plugin_1_1Feature.html#a60b9f3057386820dbcaec0eb1189ce71">values</a>.push_back(centroidLin);</div><div class="line"><a name="l00184"></a><span class="lineno">  184</span>&#160;        }</div><div class="line"><a name="l00185"></a><span class="lineno">  185</span>&#160;        returnFeatures[1].push_back(feature);</div><div class="line"><a name="l00186"></a><span class="lineno">  186</span>&#160;    }</div><div class="line"><a name="l00187"></a><span class="lineno">  187</span>&#160;</div><div class="line"><a name="l00188"></a><span class="lineno">  188</span>&#160;    <span class="keywordflow">return</span> returnFeatures;</div><div class="line"><a name="l00189"></a><span class="lineno">  189</span>&#160;}</div><div class="line"><a name="l00190"></a><span class="lineno">  190</span>&#160;</div><div class="line"><a name="l00191"></a><span class="lineno">  191</span>&#160;<a class="code" href="classVamp_1_1Plugin.html#a448fb57dc245d47923ec9eeaf9856c5f">SpectralCentroid::FeatureSet</a></div><div class="line"><a name="l00192"></a><span class="lineno"><a class="line" href="classSpectralCentroid.html#a83ba39f0870a2f86837605a958dfab1a">  192</a></span>&#160;<a class="code" href="classSpectralCentroid.html#a83ba39f0870a2f86837605a958dfab1a">SpectralCentroid::getRemainingFeatures</a>()</div><div class="line"><a name="l00193"></a><span class="lineno">  193</span>&#160;{</div><div class="line"><a name="l00194"></a><span class="lineno">  194</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="classVamp_1_1Plugin.html#a448fb57dc245d47923ec9eeaf9856c5f">FeatureSet</a>();</div><div class="line"><a name="l00195"></a><span class="lineno">  195</span>&#160;}</div><div class="line"><a name="l00196"></a><span class="lineno">  196</span>&#160;</div><div class="ttc" id="classVamp_1_1Plugin_html_a30f531b8fb69fac41a24e3d2a6a08ed9"><div class="ttname"><a href="classVamp_1_1Plugin.html#a30f531b8fb69fac41a24e3d2a6a08ed9">Vamp::Plugin::OutputList</a></div><div class="ttdeci">std::vector&lt; OutputDescriptor &gt; OutputList</div><div class="ttdef"><b>Definition:</b> <a href="vamp-sdk_2Plugin_8h_source.html#l00335">vamp-sdk/Plugin.h:335</a></div></div>
+<div class="ttc" id="classSpectralCentroid_html_afbf8f44c5724cfc7b2b12102389f10b5"><div class="ttname"><a href="classSpectralCentroid.html#afbf8f44c5724cfc7b2b12102389f10b5">SpectralCentroid::getCopyright</a></div><div class="ttdeci">std::string getCopyright() const</div><div class="ttdoc">Get the copyright statement or licensing summary for the plugin. </div><div class="ttdef"><b>Definition:</b> <a href="SpectralCentroid_8cpp_source.html#l00098">SpectralCentroid.cpp:98</a></div></div>
+<div class="ttc" id="classSpectralCentroid_html_af77b30128e071e99d0dd374a3b2fe928"><div class="ttname"><a href="classSpectralCentroid.html#af77b30128e071e99d0dd374a3b2fe928">SpectralCentroid::getOutputDescriptors</a></div><div class="ttdeci">OutputList getOutputDescriptors() const</div><div class="ttdoc">Get the outputs of this plugin. </div><div class="ttdef"><b>Definition:</b> <a href="SpectralCentroid_8cpp_source.html#l00121">SpectralCentroid.cpp:121</a></div></div>
+<div class="ttc" id="structVamp_1_1Plugin_1_1OutputDescriptor_html"><div class="ttname"><a href="structVamp_1_1Plugin_1_1OutputDescriptor.html">Vamp::Plugin::OutputDescriptor</a></div><div class="ttdef"><b>Definition:</b> <a href="vamp-sdk_2Plugin_8h_source.html#l00206">vamp-sdk/Plugin.h:206</a></div></div>
+<div class="ttc" id="structVamp_1_1Plugin_1_1OutputDescriptor_html_af0e577e1a256ff6eed6ea42133fec77d"><div class="ttname"><a href="structVamp_1_1Plugin_1_1OutputDescriptor.html#af0e577e1a256ff6eed6ea42133fec77d">Vamp::Plugin::OutputDescriptor::hasFixedBinCount</a></div><div class="ttdeci">bool hasFixedBinCount</div><div class="ttdoc">True if the output has the same number of values per sample for every output sample. </div><div class="ttdef"><b>Definition:</b> <a href="vamp-sdk_2Plugin_8h_source.html#l00239">vamp-sdk/Plugin.h:239</a></div></div>
+<div class="ttc" id="structVamp_1_1Plugin_1_1Feature_html_a60b9f3057386820dbcaec0eb1189ce71"><div class="ttname"><a href="structVamp_1_1Plugin_1_1Feature.html#a60b9f3057386820dbcaec0eb1189ce71">Vamp::Plugin::Feature::values</a></div><div class="ttdeci">std::vector&lt; float &gt; values</div><div class="ttdoc">Results for a single sample of this feature. </div><div class="ttdef"><b>Definition:</b> <a href="vamp-sdk_2Plugin_8h_source.html#l00382">vamp-sdk/Plugin.h:382</a></div></div>
+<div class="ttc" id="classVamp_1_1Plugin_html_a448fb57dc245d47923ec9eeaf9856c5f"><div class="ttname"><a href="classVamp_1_1Plugin.html#a448fb57dc245d47923ec9eeaf9856c5f">Vamp::Plugin::FeatureSet</a></div><div class="ttdeci">std::map&lt; int, FeatureList &gt; FeatureSet</div><div class="ttdef"><b>Definition:</b> <a href="vamp-sdk_2Plugin_8h_source.html#l00395">vamp-sdk/Plugin.h:395</a></div></div>
+<div class="ttc" id="classSpectralCentroid_html_aca96c70e7e75c9e4a7db38485018914c"><div class="ttname"><a href="classSpectralCentroid.html#aca96c70e7e75c9e4a7db38485018914c">SpectralCentroid::process</a></div><div class="ttdeci">FeatureSet process(const float *const *inputBuffers, Vamp::RealTime timestamp)</div><div class="ttdoc">Process a single block of input data. </div><div class="ttdef"><b>Definition:</b> <a href="SpectralCentroid_8cpp_source.html#l00146">SpectralCentroid.cpp:146</a></div></div>
+<div class="ttc" id="classSpectralCentroid_html_a9b5f5581691ff8f46bb7674d8d74395c"><div class="ttname"><a href="classSpectralCentroid.html#a9b5f5581691ff8f46bb7674d8d74395c">SpectralCentroid::reset</a></div><div class="ttdeci">void reset()</div><div class="ttdoc">Reset the plugin after use, to prepare it for another clean run. </div><div class="ttdef"><b>Definition:</b> <a href="SpectralCentroid_8cpp_source.html#l00116">SpectralCentroid.cpp:116</a></div></div>
+<div class="ttc" id="structVamp_1_1Plugin_1_1OutputDescriptor_html_af9b4fe8f78e7126ead820ba5dc55efd1"><div class="ttname"><a href="structVamp_1_1Plugin_1_1OutputDescriptor.html#af9b4fe8f78e7126ead820ba5dc55efd1">Vamp::Plugin::OutputDescriptor::description</a></div><div class="ttdeci">std::string description</div><div class="ttdoc">A human-readable short text describing the output. </div><div class="ttdef"><b>Definition:</b> <a href="vamp-sdk_2Plugin_8h_source.html#l00227">vamp-sdk/Plugin.h:227</a></div></div>
+<div class="ttc" id="classSpectralCentroid_html_aa6236ae7400468b8d23d57f8bbb917a9"><div class="ttname"><a href="classSpectralCentroid.html#aa6236ae7400468b8d23d57f8bbb917a9">SpectralCentroid::getName</a></div><div class="ttdeci">std::string getName() const</div><div class="ttdoc">Get a human-readable name or title of the plugin. </div><div class="ttdef"><b>Definition:</b> <a href="SpectralCentroid_8cpp_source.html#l00074">SpectralCentroid.cpp:74</a></div></div>
+<div class="ttc" id="structVamp_1_1Plugin_1_1OutputDescriptor_html_ae2c893ddb1860589517ab7eaa989a18b"><div class="ttname"><a href="structVamp_1_1Plugin_1_1OutputDescriptor.html#ae2c893ddb1860589517ab7eaa989a18b">Vamp::Plugin::OutputDescriptor::identifier</a></div><div class="ttdeci">std::string identifier</div><div class="ttdoc">The name of the output, in computer-usable form. </div><div class="ttdef"><b>Definition:</b> <a href="vamp-sdk_2Plugin_8h_source.html#l00214">vamp-sdk/Plugin.h:214</a></div></div>
+<div class="ttc" id="classSpectralCentroid_html_a49805a090ba58477da4adbefea4392a7"><div class="ttname"><a href="classSpectralCentroid.html#a49805a090ba58477da4adbefea4392a7">SpectralCentroid::m_stepSize</a></div><div class="ttdeci">size_t m_stepSize</div><div class="ttdef"><b>Definition:</b> <a href="SpectralCentroid_8h_source.html#l00073">SpectralCentroid.h:73</a></div></div>
+<div class="ttc" id="SpectralCentroid_8h_html"><div class="ttname"><a href="SpectralCentroid_8h.html">SpectralCentroid.h</a></div></div>
+<div class="ttc" id="classSpectralCentroid_html_a262f583d71b442bb2d80023e7c85aa4e"><div class="ttname"><a href="classSpectralCentroid.html#a262f583d71b442bb2d80023e7c85aa4e">SpectralCentroid::m_blockSize</a></div><div class="ttdeci">size_t m_blockSize</div><div class="ttdef"><b>Definition:</b> <a href="SpectralCentroid_8h_source.html#l00074">SpectralCentroid.h:74</a></div></div>
+<div class="ttc" id="classSpectralCentroid_html_a0056cd5e0615ce8766d52c0b7a92280e"><div class="ttname"><a href="classSpectralCentroid.html#a0056cd5e0615ce8766d52c0b7a92280e">SpectralCentroid::getPluginVersion</a></div><div class="ttdeci">int getPluginVersion() const</div><div class="ttdoc">Get the version number of the plugin. </div><div class="ttdef"><b>Definition:</b> <a href="SpectralCentroid_8cpp_source.html#l00092">SpectralCentroid.cpp:92</a></div></div>
+<div class="ttc" id="structVamp_1_1Plugin_1_1Feature_html"><div class="ttname"><a href="structVamp_1_1Plugin_1_1Feature.html">Vamp::Plugin::Feature</a></div><div class="ttdef"><b>Definition:</b> <a href="vamp-sdk_2Plugin_8h_source.html#l00344">vamp-sdk/Plugin.h:344</a></div></div>
+<div class="ttc" id="classVamp_1_1Plugin_html_a59b9dd82a4f4eb946cd0474cc81abc23"><div class="ttname"><a href="classVamp_1_1Plugin.html#a59b9dd82a4f4eb946cd0474cc81abc23">Vamp::Plugin::m_inputSampleRate</a></div><div class="ttdeci">float m_inputSampleRate</div><div class="ttdef"><b>Definition:</b> <a href="vamp-sdk_2Plugin_8h_source.html#l00444">vamp-sdk/Plugin.h:444</a></div></div>
+<div class="ttc" id="structVamp_1_1Plugin_1_1OutputDescriptor_html_aa057a8833fa037f06ac9f7b85b85d5e4"><div class="ttname"><a href="structVamp_1_1Plugin_1_1OutputDescriptor.html#aa057a8833fa037f06ac9f7b85b85d5e4">Vamp::Plugin::OutputDescriptor::unit</a></div><div class="ttdeci">std::string unit</div><div class="ttdoc">The unit of the output, in human-readable form. </div><div class="ttdef"><b>Definition:</b> <a href="vamp-sdk_2Plugin_8h_source.html#l00232">vamp-sdk/Plugin.h:232</a></div></div>
+<div class="ttc" id="classVamp_1_1Plugin_html_ab74f7634c6ac6e3da115667808a79c30"><div class="ttname"><a href="classVamp_1_1Plugin.html#ab74f7634c6ac6e3da115667808a79c30">Vamp::Plugin::getMinChannelCount</a></div><div class="ttdeci">virtual size_t getMinChannelCount() const</div><div class="ttdoc">Get the minimum supported number of input channels. </div><div class="ttdef"><b>Definition:</b> <a href="vamp-sdk_2Plugin_8h_source.html#l00199">vamp-sdk/Plugin.h:199</a></div></div>
+<div class="ttc" id="structVamp_1_1Plugin_1_1OutputDescriptor_html_ab824b2b34ee50f897a30901c620e8d87"><div class="ttname"><a href="structVamp_1_1Plugin_1_1OutputDescriptor.html#ab824b2b34ee50f897a30901c620e8d87">Vamp::Plugin::OutputDescriptor::name</a></div><div class="ttdeci">std::string name</div><div class="ttdoc">The human-readable name of the output. </div><div class="ttdef"><b>Definition:</b> <a href="vamp-sdk_2Plugin_8h_source.html#l00220">vamp-sdk/Plugin.h:220</a></div></div>
+<div class="ttc" id="classVamp_1_1Plugin_html_a0bff9464bc8c117470136c396b2405dd"><div class="ttname"><a href="classVamp_1_1Plugin.html#a0bff9464bc8c117470136c396b2405dd">Vamp::Plugin::getMaxChannelCount</a></div><div class="ttdeci">virtual size_t getMaxChannelCount() const</div><div class="ttdoc">Get the maximum supported number of input channels. </div><div class="ttdef"><b>Definition:</b> <a href="vamp-sdk_2Plugin_8h_source.html#l00204">vamp-sdk/Plugin.h:204</a></div></div>
+<div class="ttc" id="structVamp_1_1RealTime_html"><div class="ttname"><a href="structVamp_1_1RealTime.html">Vamp::RealTime</a></div><div class="ttdoc">RealTime represents time values to nanosecond precision with accurate arithmetic and frame-rate conve...</div><div class="ttdef"><b>Definition:</b> <a href="vamp-sdk_2RealTime_8h_source.html#l00066">vamp-sdk/RealTime.h:66</a></div></div>
+<div class="ttc" id="structVamp_1_1Plugin_1_1Feature_html_a98907091d0b6a589720ae35ae588a82b"><div class="ttname"><a href="structVamp_1_1Plugin_1_1Feature.html#a98907091d0b6a589720ae35ae588a82b">Vamp::Plugin::Feature::hasTimestamp</a></div><div class="ttdeci">bool hasTimestamp</div><div class="ttdoc">True if an output feature has its own timestamp. </div><div class="ttdef"><b>Definition:</b> <a href="vamp-sdk_2Plugin_8h_source.html#l00352">vamp-sdk/Plugin.h:352</a></div></div>
+<div class="ttc" id="classSpectralCentroid_html_a9bab5a013a818e286eb4894f9874fee1"><div class="ttname"><a href="classSpectralCentroid.html#a9bab5a013a818e286eb4894f9874fee1">SpectralCentroid::getMaker</a></div><div class="ttdeci">std::string getMaker() const</div><div class="ttdoc">Get the name of the author or vendor of the plugin in human-readable form. </div><div class="ttdef"><b>Definition:</b> <a href="SpectralCentroid_8cpp_source.html#l00086">SpectralCentroid.cpp:86</a></div></div>
+<div class="ttc" id="classSpectralCentroid_html_a4992d03772a228015ee2f8174f1bf06e"><div class="ttname"><a href="classSpectralCentroid.html#a4992d03772a228015ee2f8174f1bf06e">SpectralCentroid::getIdentifier</a></div><div class="ttdeci">std::string getIdentifier() const</div><div class="ttdoc">Get the computer-usable name of the plugin. </div><div class="ttdef"><b>Definition:</b> <a href="SpectralCentroid_8cpp_source.html#l00068">SpectralCentroid.cpp:68</a></div></div>
+<div class="ttc" id="classSpectralCentroid_html_a2cd801ad72f262eceb95ab0d22e7dbcd"><div class="ttname"><a href="classSpectralCentroid.html#a2cd801ad72f262eceb95ab0d22e7dbcd">SpectralCentroid::SpectralCentroid</a></div><div class="ttdeci">SpectralCentroid(float inputSampleRate)</div><div class="ttdef"><b>Definition:</b> <a href="SpectralCentroid_8cpp_source.html#l00056">SpectralCentroid.cpp:56</a></div></div>
+<div class="ttc" id="classSpectralCentroid_html_ac4a840f9b3c92e0acbcc7d262e841b59"><div class="ttname"><a href="classSpectralCentroid.html#ac4a840f9b3c92e0acbcc7d262e841b59">SpectralCentroid::getDescription</a></div><div class="ttdeci">std::string getDescription() const</div><div class="ttdoc">Get a human-readable description for the plugin, typically a line of text that may optionally be disp...</div><div class="ttdef"><b>Definition:</b> <a href="SpectralCentroid_8cpp_source.html#l00080">SpectralCentroid.cpp:80</a></div></div>
+<div class="ttc" id="classSpectralCentroid_html_a483e0d6757bc3dcf61e8066f764f45c6"><div class="ttname"><a href="classSpectralCentroid.html#a483e0d6757bc3dcf61e8066f764f45c6">SpectralCentroid::~SpectralCentroid</a></div><div class="ttdeci">virtual ~SpectralCentroid()</div><div class="ttdef"><b>Definition:</b> <a href="SpectralCentroid_8cpp_source.html#l00063">SpectralCentroid.cpp:63</a></div></div>
+<div class="ttc" id="structVamp_1_1Plugin_1_1OutputDescriptor_html_abffa9ed50cd756df70fd51f0355f448ca0459d5d0d2198d21e8bc90abe4fdccca"><div class="ttname"><a href="structVamp_1_1Plugin_1_1OutputDescriptor.html#abffa9ed50cd756df70fd51f0355f448ca0459d5d0d2198d21e8bc90abe4fdccca">Vamp::Plugin::OutputDescriptor::OneSamplePerStep</a></div><div class="ttdoc">Results from each process() align with that call&amp;#39;s block start. </div><div class="ttdef"><b>Definition:</b> <a href="vamp-sdk_2Plugin_8h_source.html#l00290">vamp-sdk/Plugin.h:290</a></div></div>
+<div class="ttc" id="structVamp_1_1Plugin_1_1OutputDescriptor_html_afdd006959a995e40ef7d565a3a4df6dc"><div class="ttname"><a href="structVamp_1_1Plugin_1_1OutputDescriptor.html#afdd006959a995e40ef7d565a3a4df6dc">Vamp::Plugin::OutputDescriptor::binCount</a></div><div class="ttdeci">size_t binCount</div><div class="ttdoc">The number of values per result of the output. </div><div class="ttdef"><b>Definition:</b> <a href="vamp-sdk_2Plugin_8h_source.html#l00247">vamp-sdk/Plugin.h:247</a></div></div>
+<div class="ttc" id="structVamp_1_1Plugin_1_1OutputDescriptor_html_a1b4858928d23bfd7d5bc557c82a83fb4"><div class="ttname"><a href="structVamp_1_1Plugin_1_1OutputDescriptor.html#a1b4858928d23bfd7d5bc557c82a83fb4">Vamp::Plugin::OutputDescriptor::isQuantized</a></div><div class="ttdeci">bool isQuantized</div><div class="ttdoc">True if the output values are quantized to a particular resolution. </div><div class="ttdef"><b>Definition:</b> <a href="vamp-sdk_2Plugin_8h_source.html#l00278">vamp-sdk/Plugin.h:278</a></div></div>
+<div class="ttc" id="structVamp_1_1Plugin_1_1OutputDescriptor_html_a0d1194980d44e31b25ef3b4b070d6b5d"><div class="ttname"><a href="structVamp_1_1Plugin_1_1OutputDescriptor.html#a0d1194980d44e31b25ef3b4b070d6b5d">Vamp::Plugin::OutputDescriptor::sampleType</a></div><div class="ttdeci">SampleType sampleType</div><div class="ttdoc">Positioning in time of the output results. </div><div class="ttdef"><b>Definition:</b> <a href="vamp-sdk_2Plugin_8h_source.html#l00302">vamp-sdk/Plugin.h:302</a></div></div>
+<div class="ttc" id="classSpectralCentroid_html_aab1ae16f5c68e2b319668f447908cedb"><div class="ttname"><a href="classSpectralCentroid.html#aab1ae16f5c68e2b319668f447908cedb">SpectralCentroid::initialise</a></div><div class="ttdeci">bool initialise(size_t channels, size_t stepSize, size_t blockSize)</div><div class="ttdoc">Initialise a plugin to prepare it for use with the given number of input channels, step size (window increment, in sample frames) and block size (window size, in sample frames). </div><div class="ttdef"><b>Definition:</b> <a href="SpectralCentroid_8cpp_source.html#l00104">SpectralCentroid.cpp:104</a></div></div>
+<div class="ttc" id="structVamp_1_1Plugin_1_1OutputDescriptor_html_ae9ccb65f99f477096b65dd031f4c5e31"><div class="ttname"><a href="structVamp_1_1Plugin_1_1OutputDescriptor.html#ae9ccb65f99f477096b65dd031f4c5e31">Vamp::Plugin::OutputDescriptor::hasKnownExtents</a></div><div class="ttdeci">bool hasKnownExtents</div><div class="ttdoc">True if the results in each output bin fall within a fixed numeric range (minimum and maximum values)...</div><div class="ttdef"><b>Definition:</b> <a href="vamp-sdk_2Plugin_8h_source.html#l00260">vamp-sdk/Plugin.h:260</a></div></div>
+<div class="ttc" id="classSpectralCentroid_html_a83ba39f0870a2f86837605a958dfab1a"><div class="ttname"><a href="classSpectralCentroid.html#a83ba39f0870a2f86837605a958dfab1a">SpectralCentroid::getRemainingFeatures</a></div><div class="ttdeci">FeatureSet getRemainingFeatures()</div><div class="ttdoc">After all blocks have been processed, calculate and return any remaining features derived from the co...</div><div class="ttdef"><b>Definition:</b> <a href="SpectralCentroid_8cpp_source.html#l00192">SpectralCentroid.cpp:192</a></div></div>
+</div><!-- fragment --></div><!-- contents -->
+</div><!-- doc-content -->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    <li class="navelem"><a class="el" href="dir_d28a4824dc47e487b107a5db32ef43c4.html">examples</a></li><li class="navelem"><a class="el" href="SpectralCentroid_8cpp.html">SpectralCentroid.cpp</a></li>
+    <li class="footer">Generated by
+    <a href="http://www.doxygen.org/index.html">
+    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.13 </li>
+  </ul>
 </div>
-  <div id="nav-path" class="navpath">
-    <ul>
-      <li class="navelem"><a class="el" href="SpectralCentroid_8cpp.html">SpectralCentroid.cpp</a>      </li>
-
-    <li class="footer">Generated on Fri Jul 13 2012 13:28:48 for VampPluginSDK by
-    <a href="http://www.doxygen.org/index.html">
-    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.0 </li>
-   </ul>
- </div>
-
-
 </body>
 </html>