From 79b312df05887fb6c9dbfa56bb78bbb6f06a1a3d Mon Sep 17 00:00:00 2001 From: Comment Date: Tue, 9 Apr 2013 16:35:19 +0100 Subject: vamphost success --- rotord/vampHost.cpp | 102 +++++++++++++++++++++++++++++++++++++++++++++++----- rotord/vampHost.h | 2 ++ 2 files changed, 95 insertions(+), 9 deletions(-) (limited to 'rotord') diff --git a/rotord/vampHost.cpp b/rotord/vampHost.cpp index 805481c..21f5db5 100644 --- a/rotord/vampHost.cpp +++ b/rotord/vampHost.cpp @@ -643,6 +643,7 @@ 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]; @@ -721,9 +722,66 @@ bool vampHost::Analyser::init(const string &soname,const string &id,const int &_ } void vampHost::Analyser::process_frame(uint8_t *data,int samples_in_frame){ int sample=0; - RealTime rt; + //process the whole frame which may be f>1getIdentifier()<<" processed block "<process(plugbuf, rt); @@ -750,14 +804,44 @@ void vampHost::Analyser::process_frame(uint8_t *data,int samples_in_frame){ featureNo++; } - //all good but no features! what gives? + in_block-=stepSize; + currentStep++; - in_block=0; - blocks_processed++; + //shunt down the data + + 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 "< features; -- cgit v1.2.3