From 6275e8f15b63f85c2206f0acb64023610c711f24 Mon Sep 17 00:00:00 2001 From: Tim Redfern Date: Wed, 10 Apr 2013 13:49:24 +0100 Subject: signal rendering path nearly there --- rotord/vampHost.cpp | 132 ++++++++++++++++------------------------------------ 1 file changed, 39 insertions(+), 93 deletions(-) (limited to 'rotord/vampHost.cpp') diff --git a/rotord/vampHost.cpp b/rotord/vampHost.cpp index 21f5db5..2713e38 100644 --- a/rotord/vampHost.cpp +++ b/rotord/vampHost.cpp @@ -604,7 +604,7 @@ bool vampHost::Analyser::init(const string &soname,const string &id,const int &_ stride=channels*bytes; scale=(1.0f/pow(2.0f,bits)); - + features[0.0f]=0; loader = PluginLoader::getInstance(); key = loader->composePluginKey(soname, id); @@ -643,7 +643,6 @@ bool vampHost::Analyser::init(const string &soname,const string &id,const int &_ currentStep = 0; finalStepsRemaining = max(1, (blockSize / stepSize) - 1); // at end of file, this many part-silent frames needed after we hit EOF - filebuf = new float[blockSize * channels]; plugbuf = new float*[channels]; for (int c = 0; c < channels; ++c) plugbuf[c] = new float[blockSize + 2]; @@ -716,7 +715,7 @@ bool vampHost::Analyser::init(const string &soname,const string &id,const int &_ blocks_processed=0; currentStep=0; - featureNo=0; + featureNo=1; return true; } @@ -725,63 +724,6 @@ void vampHost::Analyser::process_frame(uint8_t *data,int samples_in_frame){ //process the whole frame which may be f>1getIdentifier()<<" processed block "<process(plugbuf, rt); @@ -804,45 +750,45 @@ void vampHost::Analyser::process_frame(uint8_t *data,int samples_in_frame){ featureNo++; } + //shunt it down + for (int i=0;iprocess(plugbuf, rt); - - for (unsigned int i = 0; i < feat[outputNo].size(); ++i) { - features[((float)feat[outputNo][i].timestamp.sec)+(((float)feat[outputNo][i].timestamp.nsec)*.000000001)]=featureNo; - featureNo++; - } - - feat = plugin->getRemainingFeatures(); - - for (unsigned int i = 0; i < feat[outputNo].size(); ++i) { - features[((float)feat[outputNo][i].timestamp.sec)+(((float)feat[outputNo][i].timestamp.nsec)*.000000001)]=featureNo; - featureNo++; - } - - cerr<getIdentifier()<<" found "<process(plugbuf, rt); + + for (unsigned int i = 0; i < feat[outputNo].size(); ++i) { + features[((float)feat[outputNo][i].timestamp.sec)+(((float)feat[outputNo][i].timestamp.nsec)*.000000001)]=featureNo; + featureNo++; + } + + feat=plugin->getRemainingFeatures(); + + for (unsigned int i = 0; i < feat[outputNo].size(); ++i) { + features[((float)feat[outputNo][i].timestamp.sec)+(((float)feat[outputNo][i].timestamp.nsec)*.000000001)]=featureNo; + featureNo++; + } + + cerr<getIdentifier()<<" found "<<(features.size()-1)<<" features"<