changeset 2:c2305fa8e01f

* Update along with the latest Vamp API change
author cannam
date Mon, 26 Feb 2007 18:12:19 +0000
parents d9b43f698a44
children bc0cdab67251
files plugins/XTractPlugin.cpp plugins/XTractPlugin.h
diffstat 2 files changed, 29 insertions(+), 20 deletions(-) [+]
line wrap: on
line diff
--- 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);
 
 	}
--- 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;