# HG changeset patch # User cannam # Date 1172513539 0 # Node ID c2305fa8e01f979658118f0e027ea344214da87d # Parent d9b43f698a44c38ce129e6f3eec7a86efc4b640f * Update along with the latest Vamp API change diff -r d9b43f698a44 -r c2305fa8e01f plugins/XTractPlugin.cpp --- a/plugins/XTractPlugin.cpp Wed Feb 14 16:16:13 2007 +0000 +++ b/plugins/XTractPlugin.cpp Mon Feb 26 18:12:19 2007 +0000 @@ -76,15 +76,21 @@ } string -XTractPlugin::getName() const +XTractPlugin::getIdentifier() const { return xtDescriptor()->algo.name; } string +XTractPlugin::getName() const +{ + return xtDescriptor()->algo.p_name; +} + +string XTractPlugin::getDescription() const { - return xtDescriptor()->algo.p_name; + return xtDescriptor()->algo.p_desc; } @@ -239,8 +245,8 @@ if (m_xtFeature == XTRACT_MFCC) { - desc.name = "minfreq"; - desc.description = "Minimum Frequency"; + desc.identifier = "minfreq"; + desc.name = "Minimum Frequency"; desc.minValue = 0; desc.maxValue = m_inputSampleRate / 2; desc.defaultValue = 80; @@ -248,16 +254,16 @@ desc.unit = "Hz"; list.push_back(desc); - desc.name = "maxfreq"; - desc.description = "Maximum Frequency"; + desc.identifier = "maxfreq"; + desc.name = "Maximum Frequency"; desc.defaultValue = 18000; if (desc.defaultValue > m_inputSampleRate * 0.875) { desc.defaultValue = m_inputSampleRate * 0.875; } list.push_back(desc); - desc.name = "bands"; - desc.description = "Mel Frequency Bands"; + desc.identifier = "bands"; + desc.name = "Mel Frequency Bands"; desc.minValue = 10; desc.maxValue = 30; desc.defaultValue = 20; @@ -266,8 +272,8 @@ desc.quantizeStep = 1; list.push_back(desc); - desc.name = "style"; - desc.description = "MFCC Type"; + desc.identifier = "style"; + desc.name = "MFCC Type"; desc.minValue = 0; desc.maxValue = 1; desc.defaultValue = 0; @@ -278,8 +284,8 @@ if (needPeakThreshold()) { - desc.name = "peak threshold"; - desc.description = "Peak Threshold"; + desc.identifier = "peak threshold"; + desc.name = "Peak Threshold"; desc.minValue = 0; desc.maxValue = 100; desc.defaultValue = 10; /* Threshold as % of maximum peak found */ @@ -292,8 +298,8 @@ if (needRolloffThreshold()) { - desc.name = "rolloff threshold"; - desc.description = "Rolloff Threshold"; + desc.identifier = "rolloff threshold"; + desc.name = "Rolloff Threshold"; desc.minValue = 0; desc.maxValue = 100; desc.defaultValue = 90; /* Freq below which 90% of energy is */ @@ -306,8 +312,8 @@ if (needHarmonicThreshold()) { - desc.name = "harmonic threshold"; - desc.description = "Harmonic Threshold"; + desc.identifier = "harmonic threshold"; + desc.name = "Harmonic Threshold"; desc.minValue = 0; desc.maxValue = 1.0; desc.defaultValue = .1; /* Distance from nearesst harmonic number */ @@ -364,9 +370,10 @@ { OutputDescriptor d; const xtract_function_descriptor_t *xtFd = xtDescriptor(); - d.name = getName(); + d.identifier = getIdentifier(); + d.name = getName(); + d.description = getDescription(); d.unit = ""; - d.description = getDescription(); d.hasFixedBinCount = true; d.binCount = m_outputBinCount; d.hasKnownExtents = false; @@ -384,8 +391,9 @@ if (xtFd->result.vector.format == XTRACT_SPECTRAL){ d.binCount /= 2; - d.name = "amplitudes"; - d.description = "Peak Amplitudes"; + d.identifier = "amplitudes"; + d.name = "Peak Amplitudes"; + d.description = ""; m_outputDescriptors.push_back(d); } diff -r d9b43f698a44 -r c2305fa8e01f plugins/XTractPlugin.h --- a/plugins/XTractPlugin.h Wed Feb 14 16:16:13 2007 +0000 +++ b/plugins/XTractPlugin.h Mon Feb 26 18:12:19 2007 +0000 @@ -31,6 +31,7 @@ InputDomain getInputDomain() const; + std::string getIdentifier() const; std::string getName() const; std::string getDescription() const; std::string getMaker() const;