# HG changeset patch # User luisf # Date 1363279964 0 # Node ID 703f52bf8a2e30e3cdf382afbbd8e738613d6adf # Parent db72f98403b47c47cb1db44c988b238b0770ff7f Printing a few results diff -r db72f98403b4 -r 703f52bf8a2e vampyhost.cpp --- a/vampyhost.cpp Thu Mar 14 11:37:07 2013 +0000 +++ b/vampyhost.cpp Thu Mar 14 16:52:44 2013 +0000 @@ -569,19 +569,37 @@ cout << "[Host] Called plugin->process" << endl; /* TODO: DO SOMETHONG WITH THE FEATURE SET HERE */ -/// convert to appropriate python objects, reuse types and conversion utilities from Vampy ... + /// convert to appropriate python objects, reuse types and conversion utilities from Vampy ... + // Loop FeatureLists + for(int i = 0; i < pd->output.size(); i++ ){ + cout << "FeatureList #" << i << " has size " << pd->output[i].size() << endl; + + // loop Features + for(int j = 0; j < pd->output[i].size(); j++ ){ + cout << "Feature #" << j << endl; + cout << " Label: " << pd->output[i][j].label << endl; + cout << " hasTimestamp? " << pd->output[i][j].hasTimestamp << endl; + cout << " hasDuration? " << pd->output[i][j].hasDuration << endl; + cout << " values.size " << pd->output[i][j].values.size() << endl; + cout << " values[0] " << pd->output[i][j].values[0] << endl; + } + } + + size_t outLength = pd->output[0].size(); + Plugin::FeatureList features = pd->output[0]; + + // New PyList for the featurelist + PyObject *pyFeatureList = PyList_New(outLength); + + cout << "Survived" << endl; for (int c = 0; c < channels; ++c){ delete[] inbuf[c]; } delete[] inbuf; - - - - - return NULL; //!!! Need to return actual features! + return pyFeatureList; //!!! Need to return actual features! } /* GET / SET OUTPUT */ diff -r db72f98403b4 -r 703f52bf8a2e vampyhost_test.py --- a/vampyhost_test.py Thu Mar 14 11:37:07 2013 +0000 +++ b/vampyhost_test.py Thu Mar 14 16:52:44 2013 +0000 @@ -81,8 +81,15 @@ print "Gonna send", len(audio) + out = vh.process(handle, audio, rt) -print "OKEYDOKEY: Processed" + +print "Processed correctly" + +print type(out) + + +####### output = vh.getOutput(handle, 1)