changeset 115:75b436b9cf2f

plugins/{Mfcc,MelEnergy}.cpp: set samplerate to OneSamplePerStep, remove feature.timestamp, thanks to Chris Cannam
author Paul Brossier <piem@piem.org>
date Tue, 03 Feb 2015 10:25:08 +0100
parents e0db793df4a3
children 97ffda1a7342
files plugins/MelEnergy.cpp plugins/Mfcc.cpp
diffstat 2 files changed, 2 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/MelEnergy.cpp	Mon Feb 02 21:13:48 2015 +0100
+++ b/plugins/MelEnergy.cpp	Tue Feb 03 10:25:08 2015 +0100
@@ -189,7 +189,7 @@
     d.binCount = m_nfilters;
     d.isQuantized = true;
     d.sampleType = OutputDescriptor::FixedSampleRate;
-    d.sampleRate = m_inputSampleRate / m_stepSize;
+    d.sampleRate = OutputDescriptor::OneSamplePerStep;
     list.push_back(d);
 
     return list;
@@ -218,8 +218,6 @@
     aubio_filterbank_do(m_melbank, m_ispec, m_ovec);
 
     Feature feature;
-    //feature.hasTimestamp = false;
-    feature.timestamp = timestamp;
     for (uint_t i = 0; i < m_ovec->length; i++) {
         float value = m_ovec->data[i];
         feature.values.push_back(value);
--- a/plugins/Mfcc.cpp	Mon Feb 02 21:13:48 2015 +0100
+++ b/plugins/Mfcc.cpp	Tue Feb 03 10:25:08 2015 +0100
@@ -200,7 +200,7 @@
     d.binCount = m_ncoeffs;
     d.isQuantized = true;
     d.sampleType = OutputDescriptor::FixedSampleRate;
-    d.sampleRate = m_inputSampleRate / m_stepSize;
+    d.sampleRate = OutputDescriptor::OneSamplePerStep;
     list.push_back(d);
 
     return list;
@@ -229,8 +229,6 @@
     aubio_mfcc_do(m_mfcc, m_ispec, m_ovec);
 
     Feature feature;
-    //feature.hasTimestamp = false;
-    feature.timestamp = timestamp;
     for (uint_t i = 0; i < m_ovec->length; i++) {
         float value = m_ovec->data[i];
         feature.values.push_back(value);