summaryrefslogtreecommitdiff
path: root/rotord/vampHost.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'rotord/vampHost.cpp')
-rw-r--r--rotord/vampHost.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/rotord/vampHost.cpp b/rotord/vampHost.cpp
index 2713e38..56d57db 100644
--- a/rotord/vampHost.cpp
+++ b/rotord/vampHost.cpp
@@ -714,14 +714,14 @@ bool vampHost::Analyser::init(const string &soname,const string &id,const int &_
in_block=0;
blocks_processed=0;
currentStep=0;
-
+
featureNo=1;
return true;
}
void vampHost::Analyser::process_frame(uint8_t *data,int samples_in_frame){
int sample=0;
-
+
//process the whole frame which may be f>1<f blocks
//when the frame is finished leave the partial block for the next frame
while(sample<samples_in_frame) {
@@ -739,24 +739,24 @@ void vampHost::Analyser::process_frame(uint8_t *data,int samples_in_frame){
if (in_block==blockSize) {
//block is ready to be processed
//cerr<<plugin->getIdentifier()<<" processed block "<<blocks_processed<<endl;
-
+
//I /think/ that the vamp plugin keeps processing through the plugbuf until it encounters 0s
rt = RealTime::frame2RealTime(currentStep * stepSize, rate);
-
+
Plugin::FeatureSet feat=plugin->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++;
}
-
+
//shunt it down
for (int i=0;i<blockSize-stepSize;i++){
for (int j=0;j<channels;j++){
plugbuf[j][i]=plugbuf[j][i+stepSize];
}
}
-
+
in_block-=stepSize;
currentStep++;
}
@@ -773,9 +773,9 @@ void vampHost::Analyser::cleanup(){
}
rt = RealTime::frame2RealTime(currentStep * stepSize, rate);
-
+
Plugin::FeatureSet feat=plugin->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++;