Mercurial > hg > vamp-website
diff code-doc/classVamp_1_1HostExt_1_1PluginInputDomainAdapter.html @ 35:0976232e353b website
* Update for 2.1 release; add wiki link
author | cannam |
---|---|
date | Fri, 25 Sep 2009 15:40:18 +0000 |
parents | cc0be37dc9d3 |
children | 8260c0f4e05b |
line wrap: on
line diff
--- a/code-doc/classVamp_1_1HostExt_1_1PluginInputDomainAdapter.html Wed Sep 23 15:09:53 2009 +0000 +++ b/code-doc/classVamp_1_1HostExt_1_1PluginInputDomainAdapter.html Fri Sep 25 15:40:18 2009 +0000 @@ -1,10 +1,10 @@ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> <title>VampPluginSDK: Vamp::HostExt::PluginInputDomainAdapter Class Reference</title> +<link href="tabs.css" rel="stylesheet" type="text/css"> <link href="doxygen.css" rel="stylesheet" type="text/css"> -<link href="tabs.css" rel="stylesheet" type="text/css"> </head><body> -<!-- Generated by Doxygen 1.5.6 --> +<!-- Generated by Doxygen 1.5.8 --> <div class="navigation" id="top"> <div class="tabs"> <ul> @@ -26,48 +26,29 @@ </div> </div> <div class="contents"> -<h1>Vamp::HostExt::PluginInputDomainAdapter Class Reference</h1><!-- doxytag: class="Vamp::HostExt::PluginInputDomainAdapter" --><!-- doxytag: inherits="Vamp::HostExt::PluginWrapper" --><code>#include <<a class="el" href="PluginInputDomainAdapter_8h-source.html">vamp-hostsdk/PluginInputDomainAdapter.h</a>></code> +<h1>Vamp::HostExt::PluginInputDomainAdapter Class Reference</h1><!-- doxytag: class="Vamp::HostExt::PluginInputDomainAdapter" --><!-- doxytag: inherits="Vamp::HostExt::PluginWrapper" --><a class="el" href="classVamp_1_1HostExt_1_1PluginInputDomainAdapter.html" title="PluginInputDomainAdapter is a Vamp plugin adapter that converts time-domain input...">PluginInputDomainAdapter</a> is a <a class="el" href="namespaceVamp.html">Vamp</a> plugin adapter that converts time-domain input into frequency-domain input for plugins that need it. +<a href="#_details">More...</a> +<p> +<code>#include <<a class="el" href="PluginInputDomainAdapter_8h-source.html">vamp-hostsdk/PluginInputDomainAdapter.h</a>></code> <p> <div class="dynheader"> Inheritance diagram for Vamp::HostExt::PluginInputDomainAdapter:</div> <div class="dynsection"> <p><center><img src="classVamp_1_1HostExt_1_1PluginInputDomainAdapter__inherit__graph.png" border="0" usemap="#Vamp_1_1HostExt_1_1PluginInputDomainAdapter__inherit__map" alt="Inheritance graph"></center> <map name="Vamp_1_1HostExt_1_1PluginInputDomainAdapter__inherit__map"> -<area shape="rect" href="classVamp_1_1HostExt_1_1PluginWrapper.html" title="PluginWrapper is a simple base class for adapter plugins." alt="" coords="41,154,241,181"><area shape="rect" href="classVamp_1_1Plugin.html" title="Vamp::Plugin is a base class for plugin instance classes that provide feature extraction..." alt="" coords="92,80,191,106"><area shape="rect" href="classVamp_1_1PluginBase.html" title="A base class for plugins with optional configurable parameters, programs, etc." alt="" coords="77,5,205,32"></map> +<area shape="rect" href="classVamp_1_1HostExt_1_1PluginWrapper.html" title="PluginWrapper is a simple base class for adapter plugins." alt="" coords="40,156,229,180"><area shape="rect" href="classVamp_1_1Plugin.html" title="Vamp::Plugin is a base class for plugin instance classes that provide feature extraction..." alt="" coords="88,81,181,105"><area shape="rect" href="classVamp_1_1PluginBase.html" title="A base class for plugins with optional configurable parameters, programs, etc." alt="" coords="75,7,195,31"></map> <center><font size="2">[<a target="top" href="graph_legend.html">legend</a>]</font></center></div> <p> -<a href="classVamp_1_1HostExt_1_1PluginInputDomainAdapter-members.html">List of all members.</a><hr><a name="_details"></a><h2>Detailed Description</h2> -<a class="el" href="classVamp_1_1HostExt_1_1PluginInputDomainAdapter.html" title="PluginInputDomainAdapter is a Vamp plugin adapter that converts time-domain input...">PluginInputDomainAdapter</a> is a <a class="el" href="namespaceVamp.html">Vamp</a> plugin adapter that converts time-domain input into frequency-domain input for plugins that need it. -<p> -This permits a host to use time- and frequency-domain plugins interchangeably without needing to handle the conversion itself.<p> -This adapter uses a basic Hanning windowed FFT that supports power-of-two block sizes only. If a frequency domain plugin requests a non-power-of-two blocksize, the adapter will adjust it to a nearby power of two instead. Thus, <a class="el" href="classVamp_1_1HostExt_1_1PluginInputDomainAdapter.html#4cf40d09d02022b1962ff17bb0324ea5" title="Get the preferred block size (window size -- the number of sample frames passed in...">getPreferredBlockSize()</a> will always return a power of two if the wrapped plugin is a frequency domain one. If the plugin doesn't accept the adjusted power of two block size, <a class="el" href="classVamp_1_1HostExt_1_1PluginInputDomainAdapter.html#72d201eca10ec73bf16e07984f58f94c" title="Initialise a plugin to prepare it for use with the given number of input channels...">initialise()</a> will fail.<p> -The adapter provides no way for the host to discover whether the underlying plugin is actually a time or frequency domain plugin (except that if the preferred block size is not a power of two, it must be a time domain plugin).<p> -The FFT implementation is simple and self-contained, but unlikely to be the fastest available: a host can usually do better if it cares enough.<p> -In every respect other than its input domain handling, the <a class="el" href="classVamp_1_1HostExt_1_1PluginInputDomainAdapter.html" title="PluginInputDomainAdapter is a Vamp plugin adapter that converts time-domain input...">PluginInputDomainAdapter</a> behaves identically to the plugin that it wraps. The wrapped plugin will be deleted when the wrapper is deleted.<p> -<dl class="note" compact><dt><b>Note:</b></dt><dd>This class was introduced in version 1.1 of the <a class="el" href="namespaceVamp.html">Vamp</a> plugin SDK. </dd></dl> - -<p>Definition at line <a class="el" href="PluginInputDomainAdapter_8h-source.html#l00082">82</a> of file <a class="el" href="PluginInputDomainAdapter_8h-source.html">PluginInputDomainAdapter.h</a>.</p> -<table border="0" cellpadding="0" cellspacing="0"> +<a href="classVamp_1_1HostExt_1_1PluginInputDomainAdapter-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0"> <tr><td></td></tr> <tr><td colspan="2"><br><h2>Public Types</h2></td></tr> -<tr><td class="memItemLeft" nowrap align="right" valign="top">enum </td><td class="memItemRight" valign="bottom"><a class="el" href="classVamp_1_1Plugin.html#39cb7649d6dcc20e4cb1640cd55907bc">InputDomain</a> { <a class="el" href="classVamp_1_1Plugin.html#39cb7649d6dcc20e4cb1640cd55907bcd4a9f31b958a43a9757af7893aa2e7ff">TimeDomain</a>, -<a class="el" href="classVamp_1_1Plugin.html#39cb7649d6dcc20e4cb1640cd55907bca30e7877ab33f76acbdca28607e6ab53">FrequencyDomain</a> +<tr><td class="memItemLeft" nowrap align="right" valign="top">enum </td><td class="memItemRight" valign="bottom"><a class="el" href="classVamp_1_1HostExt_1_1PluginInputDomainAdapter.html#2518e4922d77bc4e514d84cec9a0b577">ProcessTimestampMethod</a> { <a class="el" href="classVamp_1_1HostExt_1_1PluginInputDomainAdapter.html#2518e4922d77bc4e514d84cec9a0b577fcf39fe57ba29a908d4877c21de145dd">ShiftTimestamp</a>, +<a class="el" href="classVamp_1_1HostExt_1_1PluginInputDomainAdapter.html#2518e4922d77bc4e514d84cec9a0b5770838ff456d829e9096b5d968e6c55152">ShiftData</a>, +<a class="el" href="classVamp_1_1HostExt_1_1PluginInputDomainAdapter.html#2518e4922d77bc4e514d84cec9a0b577b06e8c6824802978d0be4074a556b297">NoShift</a> }</td></tr> -<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef std::vector<br> -< <a class="el" href="structVamp_1_1Plugin_1_1OutputDescriptor.html">OutputDescriptor</a> > </td><td class="memItemRight" valign="bottom"><a class="el" href="classVamp_1_1Plugin.html#30f531b8fb69fac41a24e3d2a6a08ed9">OutputList</a></td></tr> - -<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef std::vector< <a class="el" href="structVamp_1_1Plugin_1_1Feature.html">Feature</a> > </td><td class="memItemRight" valign="bottom"><a class="el" href="classVamp_1_1Plugin.html#0730bc72c87fa02eb8d2854b233f7be1">FeatureList</a></td></tr> - -<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef std::map< int, <br> -<a class="el" href="classVamp_1_1Plugin.html#0730bc72c87fa02eb8d2854b233f7be1">FeatureList</a> > </td><td class="memItemRight" valign="bottom"><a class="el" href="classVamp_1_1Plugin.html#448fb57dc245d47923ec9eeaf9856c5f">FeatureSet</a></td></tr> - -<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef std::vector<br> -< <a class="el" href="structVamp_1_1PluginBase_1_1ParameterDescriptor.html">ParameterDescriptor</a> > </td><td class="memItemRight" valign="bottom"><a class="el" href="classVamp_1_1PluginBase.html#3b6bb4bbd86affe1ca9deceea1aad4f8">ParameterList</a></td></tr> - -<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef std::vector< std::string > </td><td class="memItemRight" valign="bottom"><a class="el" href="classVamp_1_1PluginBase.html#7f66f00437b21e5f694fe02356b12f20">ProgramList</a></td></tr> - +<tr><td class="mdescLeft"> </td><td class="mdescRight">ProcessTimestampMethod determines how the <a class="el" href="classVamp_1_1HostExt_1_1PluginInputDomainAdapter.html" title="PluginInputDomainAdapter is a Vamp plugin adapter that converts time-domain input...">PluginInputDomainAdapter</a> handles timestamps for the data passed to the <a class="el" href="classVamp_1_1HostExt_1_1PluginInputDomainAdapter.html#b36a81ac9a0ded8d83c6b855263c0231" title="Process a single block of input data.">process()</a> function of the plugin it wraps, in the case where the plugin is expecting frequency-domain data. <a href="classVamp_1_1HostExt_1_1PluginInputDomainAdapter.html#2518e4922d77bc4e514d84cec9a0b577">More...</a><br></td></tr> <tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classVamp_1_1HostExt_1_1PluginInputDomainAdapter.html#878e7275acdb77efc7a802944305039d">PluginInputDomainAdapter</a> (<a class="el" href="classVamp_1_1Plugin.html">Plugin</a> *plugin)</td></tr> @@ -77,6 +58,9 @@ <tr><td class="memItemLeft" nowrap align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classVamp_1_1HostExt_1_1PluginInputDomainAdapter.html#72d201eca10ec73bf16e07984f58f94c">initialise</a> (size_t channels, size_t stepSize, size_t blockSize)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">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). <a href="#72d201eca10ec73bf16e07984f58f94c"></a><br></td></tr> +<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classVamp_1_1HostExt_1_1PluginInputDomainAdapter.html#984a12b5b4cb0be1e2f7a0aa84106c4c">reset</a> ()</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Reset the plugin after use, to prepare it for another clean run. <a href="#984a12b5b4cb0be1e2f7a0aa84106c4c"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classVamp_1_1Plugin.html#39cb7649d6dcc20e4cb1640cd55907bc">InputDomain</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classVamp_1_1HostExt_1_1PluginInputDomainAdapter.html#47ff1ed72889f323da63f8abc9ea581a">getInputDomain</a> () const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Get the plugin's required input domain. <a href="#47ff1ed72889f323da63f8abc9ea581a"></a><br></td></tr> @@ -89,12 +73,15 @@ <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classVamp_1_1Plugin.html#448fb57dc245d47923ec9eeaf9856c5f">FeatureSet</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classVamp_1_1HostExt_1_1PluginInputDomainAdapter.html#b36a81ac9a0ded8d83c6b855263c0231">process</a> (const float *const *inputBuffers, <a class="el" href="structVamp_1_1RealTime.html">RealTime</a> timestamp)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Process a single block of input data. <a href="#b36a81ac9a0ded8d83c6b855263c0231"></a><br></td></tr> +<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classVamp_1_1HostExt_1_1PluginInputDomainAdapter.html#1d7366f8cab39abc01ebfc7bf7ca8089">setProcessTimestampMethod</a> (<a class="el" href="classVamp_1_1HostExt_1_1PluginInputDomainAdapter.html#2518e4922d77bc4e514d84cec9a0b577">ProcessTimestampMethod</a>)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Set the method used for timestamp adjustment in plugins taking frequency-domain input. <a href="#1d7366f8cab39abc01ebfc7bf7ca8089"></a><br></td></tr> +<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classVamp_1_1HostExt_1_1PluginInputDomainAdapter.html#2518e4922d77bc4e514d84cec9a0b577">ProcessTimestampMethod</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classVamp_1_1HostExt_1_1PluginInputDomainAdapter.html#cfc7a9121f678fd085448f68f15c9eae">getProcessTimestampMethod</a> () const </td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Retrieve the method used for timestamp adjustment in plugins taking frequency-domain input. <a href="#cfc7a9121f678fd085448f68f15c9eae"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="structVamp_1_1RealTime.html">RealTime</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classVamp_1_1HostExt_1_1PluginInputDomainAdapter.html#c1ab6af0fcda0a4c3f050c54b2db4769">getTimestampAdjustment</a> () const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Return the amount by which the timestamps supplied to <a class="el" href="classVamp_1_1HostExt_1_1PluginInputDomainAdapter.html#b36a81ac9a0ded8d83c6b855263c0231" title="Process a single block of input data.">process()</a> are being incremented when they are passed to the plugin's own <a class="el" href="classVamp_1_1HostExt_1_1PluginInputDomainAdapter.html#b36a81ac9a0ded8d83c6b855263c0231" title="Process a single block of input data.">process()</a> implementation. <a href="#c1ab6af0fcda0a4c3f050c54b2db4769"></a><br></td></tr> -<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classVamp_1_1HostExt_1_1PluginWrapper.html#d19cc0614ba41cdc26ef3394c5146fe6">reset</a> ()</td></tr> - -<tr><td class="mdescLeft"> </td><td class="mdescRight">Reset the plugin after use, to prepare it for another clean run. <a href="#d19cc0614ba41cdc26ef3394c5146fe6"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">unsigned int </td><td class="memItemRight" valign="bottom"><a class="el" href="classVamp_1_1HostExt_1_1PluginWrapper.html#74147fda6b44ff2169bd4a1eea0d46ff">getVampApiVersion</a> () const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Get the <a class="el" href="namespaceVamp.html">Vamp</a> API compatibility level of the plugin. <a href="#74147fda6b44ff2169bd4a1eea0d46ff"></a><br></td></tr> @@ -146,7 +133,7 @@ <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classVamp_1_1Plugin.html#448fb57dc245d47923ec9eeaf9856c5f">FeatureSet</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classVamp_1_1HostExt_1_1PluginWrapper.html#2bc8c0992e64f06991fb7cf89f99857e">getRemainingFeatures</a> ()</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">After all blocks have been processed, calculate and return any remaining features derived from the complete input. <a href="#2bc8c0992e64f06991fb7cf89f99857e"></a><br></td></tr> -<tr><td class="memTemplParams" nowrap colspan="2">template<typename WrapperType> </td></tr> +<tr><td class="memTemplParams" nowrap colspan="2">template<typename WrapperType > </td></tr> <tr><td class="memTemplItemLeft" nowrap align="right" valign="top">WrapperType * </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classVamp_1_1HostExt_1_1PluginWrapper.html#e9d79bed7237d55a73018a6b982a55b3">getWrapper</a> ()</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Return a pointer to the plugin wrapper of type WrapperType surrounding this wrapper's plugin, if present. <a href="#e9d79bed7237d55a73018a6b982a55b3"></a><br></td></tr> @@ -161,6 +148,17 @@ <tr><td class="memItemLeft" nowrap align="right" valign="top">float </td><td class="memItemRight" valign="bottom"><a class="el" href="classVamp_1_1Plugin.html#59b9dd82a4f4eb946cd0474cc81abc23">m_inputSampleRate</a></td></tr> </table> +<hr><a name="_details"></a><h2>Detailed Description</h2> +<a class="el" href="classVamp_1_1HostExt_1_1PluginInputDomainAdapter.html" title="PluginInputDomainAdapter is a Vamp plugin adapter that converts time-domain input...">PluginInputDomainAdapter</a> is a <a class="el" href="namespaceVamp.html">Vamp</a> plugin adapter that converts time-domain input into frequency-domain input for plugins that need it. +<p> +This permits a host to use time- and frequency-domain plugins interchangeably without needing to handle the conversion itself.<p> +This adapter uses a basic Hanning windowed FFT that supports power-of-two block sizes only. If a frequency domain plugin requests a non-power-of-two blocksize, the adapter will adjust it to a nearby power of two instead. Thus, <a class="el" href="classVamp_1_1HostExt_1_1PluginInputDomainAdapter.html#4cf40d09d02022b1962ff17bb0324ea5" title="Get the preferred block size (window size -- the number of sample frames passed in...">getPreferredBlockSize()</a> will always return a power of two if the wrapped plugin is a frequency domain one. If the plugin doesn't accept the adjusted power of two block size, <a class="el" href="classVamp_1_1HostExt_1_1PluginInputDomainAdapter.html#72d201eca10ec73bf16e07984f58f94c" title="Initialise a plugin to prepare it for use with the given number of input channels...">initialise()</a> will fail.<p> +The adapter provides no way for the host to discover whether the underlying plugin is actually a time or frequency domain plugin (except that if the preferred block size is not a power of two, it must be a time domain plugin).<p> +The FFT implementation is simple and self-contained, but unlikely to be the fastest available: a host can usually do better if it cares enough.<p> +In every respect other than its input domain handling, the <a class="el" href="classVamp_1_1HostExt_1_1PluginInputDomainAdapter.html" title="PluginInputDomainAdapter is a Vamp plugin adapter that converts time-domain input...">PluginInputDomainAdapter</a> behaves identically to the plugin that it wraps. The wrapped plugin will be deleted when the wrapper is deleted.<p> +<dl class="note" compact><dt><b>Note:</b></dt><dd>This class was introduced in version 1.1 of the <a class="el" href="namespaceVamp.html">Vamp</a> plugin SDK. </dd></dl> + +<p>Definition at line <a class="el" href="PluginInputDomainAdapter_8h-source.html#l00082">82</a> of file <a class="el" href="PluginInputDomainAdapter_8h-source.html">PluginInputDomainAdapter.h</a>.</p> <hr><h2>Member Typedef Documentation</h2> <a class="anchor" name="30f531b8fb69fac41a24e3d2a6a08ed9"></a><!-- doxytag: member="Vamp::HostExt::PluginInputDomainAdapter::OutputList" ref="30f531b8fb69fac41a24e3d2a6a08ed9" args="" --> <div class="memitem"> @@ -175,7 +173,7 @@ <p> -<p>Definition at line <a class="el" href="vamp-sdk_2Plugin_8h-source.html#l00322">322</a> of file <a class="el" href="vamp-sdk_2Plugin_8h-source.html">vamp-sdk/Plugin.h</a>.</p> +<p>Definition at line <a class="el" href="vamp-sdk_2Plugin_8h-source.html#l00327">327</a> of file <a class="el" href="vamp-sdk_2Plugin_8h-source.html">vamp-sdk/Plugin.h</a>.</p> </div> </div><p> @@ -192,7 +190,7 @@ <p> -<p>Definition at line <a class="el" href="vamp-sdk_2Plugin_8h-source.html#l00380">380</a> of file <a class="el" href="vamp-sdk_2Plugin_8h-source.html">vamp-sdk/Plugin.h</a>.</p> +<p>Definition at line <a class="el" href="vamp-sdk_2Plugin_8h-source.html#l00385">385</a> of file <a class="el" href="vamp-sdk_2Plugin_8h-source.html">vamp-sdk/Plugin.h</a>.</p> </div> </div><p> @@ -209,7 +207,7 @@ <p> -<p>Definition at line <a class="el" href="vamp-sdk_2Plugin_8h-source.html#l00382">382</a> of file <a class="el" href="vamp-sdk_2Plugin_8h-source.html">vamp-sdk/Plugin.h</a>.</p> +<p>Definition at line <a class="el" href="vamp-sdk_2Plugin_8h-source.html#l00387">387</a> of file <a class="el" href="vamp-sdk_2Plugin_8h-source.html">vamp-sdk/Plugin.h</a>.</p> </div> </div><p> @@ -248,6 +246,39 @@ </div> </div><p> <hr><h2>Member Enumeration Documentation</h2> +<a class="anchor" name="2518e4922d77bc4e514d84cec9a0b577"></a><!-- doxytag: member="Vamp::HostExt::PluginInputDomainAdapter::ProcessTimestampMethod" ref="2518e4922d77bc4e514d84cec9a0b577" args="" --> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">enum <a class="el" href="classVamp_1_1HostExt_1_1PluginInputDomainAdapter.html#2518e4922d77bc4e514d84cec9a0b577">Vamp::HostExt::PluginInputDomainAdapter::ProcessTimestampMethod</a> </td> + </tr> + </table> +</div> +<div class="memdoc"> + +<p> +ProcessTimestampMethod determines how the <a class="el" href="classVamp_1_1HostExt_1_1PluginInputDomainAdapter.html" title="PluginInputDomainAdapter is a Vamp plugin adapter that converts time-domain input...">PluginInputDomainAdapter</a> handles timestamps for the data passed to the <a class="el" href="classVamp_1_1HostExt_1_1PluginInputDomainAdapter.html#b36a81ac9a0ded8d83c6b855263c0231" title="Process a single block of input data.">process()</a> function of the plugin it wraps, in the case where the plugin is expecting frequency-domain data. +<p> +The <a class="el" href="namespaceVamp.html">Vamp</a> specification requires that the timestamp passed to the plugin for frequency-domain input should be that of the centre of the processing block, rather than the start as is the case for time-domain input.<p> +Since <a class="el" href="classVamp_1_1HostExt_1_1PluginInputDomainAdapter.html" title="PluginInputDomainAdapter is a Vamp plugin adapter that converts time-domain input...">PluginInputDomainAdapter</a> aims to be transparent in use, it needs to handle this timestamp adjustment itself. However, some control is available over the method used for adjustment, by means of the ProcessTimestampMethod setting.<p> +If ProcessTimestampMethod is set to ShiftTimestamp (the default), then the data passed to the wrapped plugin will be calculated from the same input data block as passed to the wrapper, but the timestamp passed to the plugin will be advanced by half of the window size.<p> +If ProcessTimestampMethod is set to ShiftData, then the timestamp passed to the wrapped plugin will be the same as that passed to the process call of the wrapper, but the data block used to calculate the input will be shifted back (earlier) by half of the window size, with half a block of zero padding at the start of the first process call. This has the advantage of preserving the first half block of audio without any deterioration from window shaping.<p> +If ProcessTimestampMethod is set to NoShift, then no adjustment will be made and the timestamps will be incorrect. <dl compact><dt><b>Enumerator: </b></dt><dd> +<table border="0" cellspacing="2" cellpadding="0"> +<tr><td valign="top"><em><a class="anchor" name="2518e4922d77bc4e514d84cec9a0b577fcf39fe57ba29a908d4877c21de145dd"></a><!-- doxytag: member="ShiftTimestamp" ref="2518e4922d77bc4e514d84cec9a0b577fcf39fe57ba29a908d4877c21de145dd" args="" -->ShiftTimestamp</em> </td><td> +</td></tr> +<tr><td valign="top"><em><a class="anchor" name="2518e4922d77bc4e514d84cec9a0b5770838ff456d829e9096b5d968e6c55152"></a><!-- doxytag: member="ShiftData" ref="2518e4922d77bc4e514d84cec9a0b5770838ff456d829e9096b5d968e6c55152" args="" -->ShiftData</em> </td><td> +</td></tr> +<tr><td valign="top"><em><a class="anchor" name="2518e4922d77bc4e514d84cec9a0b577b06e8c6824802978d0be4074a556b297"></a><!-- doxytag: member="NoShift" ref="2518e4922d77bc4e514d84cec9a0b577b06e8c6824802978d0be4074a556b297" args="" -->NoShift</em> </td><td> +</td></tr> +</table> +</dl> + +<p>Definition at line <a class="el" href="PluginInputDomainAdapter_8h-source.html#l00137">137</a> of file <a class="el" href="PluginInputDomainAdapter_8h-source.html">PluginInputDomainAdapter.h</a>.</p> + +</div> +</div><p> <a class="anchor" name="39cb7649d6dcc20e4cb1640cd55907bc"></a><!-- doxytag: member="Vamp::HostExt::PluginInputDomainAdapter::InputDomain" ref="39cb7649d6dcc20e4cb1640cd55907bc" args="" --> <div class="memitem"> <div class="memproto"> @@ -356,6 +387,29 @@ </div> </div><p> +<a class="anchor" name="984a12b5b4cb0be1e2f7a0aa84106c4c"></a><!-- doxytag: member="Vamp::HostExt::PluginInputDomainAdapter::reset" ref="984a12b5b4cb0be1e2f7a0aa84106c4c" args="()" --> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">void Vamp::HostExt::PluginInputDomainAdapter::reset </td> + <td>(</td> + <td class="paramname"> </td> + <td> ) </td> + <td><code> [virtual]</code></td> + </tr> + </table> +</div> +<div class="memdoc"> + +<p> +Reset the plugin after use, to prepare it for another clean run. +<p> +Not called for the first initialisation (i.e. initialise must also do a reset). +<p>Reimplemented from <a class="el" href="classVamp_1_1HostExt_1_1PluginWrapper.html#d19cc0614ba41cdc26ef3394c5146fe6">Vamp::HostExt::PluginWrapper</a>.</p> + +</div> +</div><p> <a class="anchor" name="47ff1ed72889f323da63f8abc9ea581a"></a><!-- doxytag: member="Vamp::HostExt::PluginInputDomainAdapter::getInputDomain" ref="47ff1ed72889f323da63f8abc9ea581a" args="() const " --> <div class="memitem"> <div class="memproto"> @@ -374,7 +428,8 @@ <p> Get the plugin's required input domain. <p> -If this is TimeDomain, the samples provided to the <a class="el" href="classVamp_1_1HostExt_1_1PluginInputDomainAdapter.html#b36a81ac9a0ded8d83c6b855263c0231" title="Process a single block of input data.">process()</a> function (below) will be in the time domain, as for a traditional audio processing plugin. If this is FrequencyDomain, the host will carry out a windowed FFT of size equal to the negotiated block size on the data before passing the frequency bin data in to <a class="el" href="classVamp_1_1HostExt_1_1PluginInputDomainAdapter.html#b36a81ac9a0ded8d83c6b855263c0231" title="Process a single block of input data.">process()</a>. The plugin does not get to choose the window type -- the host will either let the user do so, or will use a Hanning window. +If this is TimeDomain, the samples provided to the <a class="el" href="classVamp_1_1HostExt_1_1PluginInputDomainAdapter.html#b36a81ac9a0ded8d83c6b855263c0231" title="Process a single block of input data.">process()</a> function (below) will be in the time domain, as for a traditional audio processing plugin.<p> +If this is FrequencyDomain, the host will carry out a windowed FFT of size equal to the negotiated block size on the data before passing the frequency bin data in to <a class="el" href="classVamp_1_1HostExt_1_1PluginInputDomainAdapter.html#b36a81ac9a0ded8d83c6b855263c0231" title="Process a single block of input data.">process()</a>. The input data for the FFT will be rotated so as to place the origin in the centre of the block. The plugin does not get to choose the window type -- the host will either let the user do so, or will use a Hanning window. <p>Reimplemented from <a class="el" href="classVamp_1_1HostExt_1_1PluginWrapper.html#e203faf8384c9e1fddc381409aa8a214">Vamp::HostExt::PluginWrapper</a>.</p> </div> @@ -462,6 +517,50 @@ </div> </div><p> +<a class="anchor" name="1d7366f8cab39abc01ebfc7bf7ca8089"></a><!-- doxytag: member="Vamp::HostExt::PluginInputDomainAdapter::setProcessTimestampMethod" ref="1d7366f8cab39abc01ebfc7bf7ca8089" args="(ProcessTimestampMethod)" --> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">void Vamp::HostExt::PluginInputDomainAdapter::setProcessTimestampMethod </td> + <td>(</td> + <td class="paramtype"><a class="el" href="classVamp_1_1HostExt_1_1PluginInputDomainAdapter.html#2518e4922d77bc4e514d84cec9a0b577">ProcessTimestampMethod</a> </td> + <td class="paramname"> </td> + <td> ) </td> + <td></td> + </tr> + </table> +</div> +<div class="memdoc"> + +<p> +Set the method used for timestamp adjustment in plugins taking frequency-domain input. +<p> +See the ProcessTimestampMethod documentation for details.<p> +This function must be called before the first call to <a class="el" href="classVamp_1_1HostExt_1_1PluginInputDomainAdapter.html#b36a81ac9a0ded8d83c6b855263c0231" title="Process a single block of input data.">process()</a>. +</div> +</div><p> +<a class="anchor" name="cfc7a9121f678fd085448f68f15c9eae"></a><!-- doxytag: member="Vamp::HostExt::PluginInputDomainAdapter::getProcessTimestampMethod" ref="cfc7a9121f678fd085448f68f15c9eae" args="() const " --> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname"><a class="el" href="classVamp_1_1HostExt_1_1PluginInputDomainAdapter.html#2518e4922d77bc4e514d84cec9a0b577">ProcessTimestampMethod</a> Vamp::HostExt::PluginInputDomainAdapter::getProcessTimestampMethod </td> + <td>(</td> + <td class="paramname"> </td> + <td> ) </td> + <td> const</td> + </tr> + </table> +</div> +<div class="memdoc"> + +<p> +Retrieve the method used for timestamp adjustment in plugins taking frequency-domain input. +<p> +See the ProcessTimestampMethod documentation for details. +</div> +</div><p> <a class="anchor" name="c1ab6af0fcda0a4c3f050c54b2db4769"></a><!-- doxytag: member="Vamp::HostExt::PluginInputDomainAdapter::getTimestampAdjustment" ref="c1ab6af0fcda0a4c3f050c54b2db4769" args="() const " --> <div class="memitem"> <div class="memproto"> @@ -482,36 +581,12 @@ <p> The <a class="el" href="namespaceVamp.html">Vamp</a> API mandates that the timestamp passed to the plugin for time-domain input should be the time of the first sample in the block, but the timestamp passed for frequency-domain input should be the timestamp of the centre of the block.<p> The <a class="el" href="classVamp_1_1HostExt_1_1PluginInputDomainAdapter.html" title="PluginInputDomainAdapter is a Vamp plugin adapter that converts time-domain input...">PluginInputDomainAdapter</a> adjusts its timestamps properly so that the plugin receives correct times, but in some circumstances (such as for establishing the correct timing of implicitly-timed features, i.e. features without their own timestamps) the host may need to be aware that this adjustment is taking place.<p> -If the plugin requires time-domain input, this function will return zero. The result of calling this function before <a class="el" href="classVamp_1_1HostExt_1_1PluginInputDomainAdapter.html#72d201eca10ec73bf16e07984f58f94c" title="Initialise a plugin to prepare it for use with the given number of input channels...">initialise()</a> has been called is undefined. +If the plugin requires time-domain input or the <a class="el" href="classVamp_1_1HostExt_1_1PluginInputDomainAdapter.html" title="PluginInputDomainAdapter is a Vamp plugin adapter that converts time-domain input...">PluginInputDomainAdapter</a> is configured with its ProcessTimestampMethod set to ShiftData instead of ShiftTimestamp, then this function will return zero.<p> +The result of calling this function before <a class="el" href="classVamp_1_1HostExt_1_1PluginInputDomainAdapter.html#72d201eca10ec73bf16e07984f58f94c" title="Initialise a plugin to prepare it for use with the given number of input channels...">initialise()</a> has been called is undefined. <p>Referenced by <a class="el" href="vamp-simple-host_8cpp-source.html#l00265">runPlugin()</a>.</p> </div> </div><p> -<a class="anchor" name="d19cc0614ba41cdc26ef3394c5146fe6"></a><!-- doxytag: member="Vamp::HostExt::PluginInputDomainAdapter::reset" ref="d19cc0614ba41cdc26ef3394c5146fe6" args="()" --> -<div class="memitem"> -<div class="memproto"> - <table class="memname"> - <tr> - <td class="memname">void Vamp::HostExt::PluginWrapper::reset </td> - <td>(</td> - <td class="paramname"> </td> - <td> ) </td> - <td><code> [virtual, inherited]</code></td> - </tr> - </table> -</div> -<div class="memdoc"> - -<p> -Reset the plugin after use, to prepare it for another clean run. -<p> -Not called for the first initialisation (i.e. initialise must also do a reset). -<p>Implements <a class="el" href="classVamp_1_1Plugin.html#ad67dc9d0052417511070c4ebcfbf24f">Vamp::Plugin</a>.</p> - -<p>Reimplemented in <a class="el" href="classVamp_1_1HostExt_1_1PluginBufferingAdapter.html#131fd9fe8a1795d7370d8a721176868a">Vamp::HostExt::PluginBufferingAdapter</a>.</p> - -</div> -</div><p> <a class="anchor" name="74147fda6b44ff2169bd4a1eea0d46ff"></a><!-- doxytag: member="Vamp::HostExt::PluginInputDomainAdapter::getVampApiVersion" ref="74147fda6b44ff2169bd4a1eea0d46ff" args="() const " --> <div class="memitem"> <div class="memproto"> @@ -932,7 +1007,7 @@ <div class="memitem"> <div class="memproto"> <div class="memtemplate"> -template<typename WrapperType> </div> +template<typename WrapperType > </div> <table class="memname"> <tr> <td class="memname">WrapperType* Vamp::HostExt::PluginWrapper::getWrapper </td> @@ -978,7 +1053,7 @@ Do not reimplement this function in your subclass. <p>Implements <a class="el" href="classVamp_1_1PluginBase.html#2da03e9ced8dc7e4382205e6dc05dbff">Vamp::PluginBase</a>.</p> -<p>Definition at line <a class="el" href="vamp-sdk_2Plugin_8h-source.html#l00425">425</a> of file <a class="el" href="vamp-sdk_2Plugin_8h-source.html">vamp-sdk/Plugin.h</a>.</p> +<p>Definition at line <a class="el" href="vamp-sdk_2Plugin_8h-source.html#l00430">430</a> of file <a class="el" href="vamp-sdk_2Plugin_8h-source.html">vamp-sdk/Plugin.h</a>.</p> </div> </div><p> @@ -996,7 +1071,7 @@ <p> -<p>Definition at line <a class="el" href="PluginInputDomainAdapter_8h-source.html#l00126">126</a> of file <a class="el" href="PluginInputDomainAdapter_8h-source.html">PluginInputDomainAdapter.h</a>.</p> +<p>Definition at line <a class="el" href="PluginInputDomainAdapter_8h-source.html#l00188">188</a> of file <a class="el" href="PluginInputDomainAdapter_8h-source.html">PluginInputDomainAdapter.h</a>.</p> </div> </div><p> @@ -1030,17 +1105,17 @@ <p> -<p>Definition at line <a class="el" href="vamp-sdk_2Plugin_8h-source.html#l00431">431</a> of file <a class="el" href="vamp-sdk_2Plugin_8h-source.html">vamp-sdk/Plugin.h</a>.</p> +<p>Definition at line <a class="el" href="vamp-sdk_2Plugin_8h-source.html#l00436">436</a> of file <a class="el" href="vamp-sdk_2Plugin_8h-source.html">vamp-sdk/Plugin.h</a>.</p> -<p>Referenced by <a class="el" href="ZeroCrossing_8cpp-source.html#l00111">ZeroCrossing::getOutputDescriptors()</a>, <a class="el" href="PercussionOnsetDetector_8cpp-source.html#l00196">PercussionOnsetDetector::getOutputDescriptors()</a>, <a class="el" href="AmplitudeFollower_8cpp-source.html#l00105">AmplitudeFollower::initialise()</a>, <a class="el" href="ZeroCrossing_8cpp-source.html#l00142">ZeroCrossing::process()</a>, <a class="el" href="SpectralCentroid_8cpp-source.html#l00141">SpectralCentroid::process()</a>, and <a class="el" href="PercussionOnsetDetector_8cpp-source.html#l00226">PercussionOnsetDetector::process()</a>.</p> +<p>Referenced by <a class="el" href="ZeroCrossing_8cpp-source.html#l00111">ZeroCrossing::getOutputDescriptors()</a>, <a class="el" href="PercussionOnsetDetector_8cpp-source.html#l00196">PercussionOnsetDetector::getOutputDescriptors()</a>, <a class="el" href="AmplitudeFollower_8cpp-source.html#l00105">AmplitudeFollower::initialise()</a>, <a class="el" href="ZeroCrossing_8cpp-source.html#l00142">ZeroCrossing::process()</a>, <a class="el" href="SpectralCentroid_8cpp-source.html#l00146">SpectralCentroid::process()</a>, and <a class="el" href="PercussionOnsetDetector_8cpp-source.html#l00226">PercussionOnsetDetector::process()</a>.</p> </div> </div><p> <hr>The documentation for this class was generated from the following file:<ul> <li><a class="el" href="PluginInputDomainAdapter_8h-source.html">PluginInputDomainAdapter.h</a></ul> </div> -<hr size="1"><address style="text-align: right;"><small>Generated on Mon Dec 8 14:37:21 2008 for VampPluginSDK by +<hr size="1"><address style="text-align: right;"><small>Generated on Thu Sep 24 13:40:14 2009 for VampPluginSDK by <a href="http://www.doxygen.org/index.html"> -<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.6 </small></address> +<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.8 </small></address> </body> </html>