Mercurial > hg > piper-cpp
diff vamp-client/client.cpp @ 89:03ed2e0a6c8f
More testing
author | Chris Cannam <c.cannam@qmul.ac.uk> |
---|---|
date | Wed, 12 Oct 2016 21:34:21 +0100 |
parents | bf2e6f939f9f |
children | 6429a99abcad |
line wrap: on
line diff
--- a/vamp-client/client.cpp Wed Oct 12 19:02:31 2016 +0100 +++ b/vamp-client/client.cpp Wed Oct 12 21:34:21 2016 +0100 @@ -51,8 +51,11 @@ ~PiperClient() { if (m_process) { if (m_process->state() != QProcess::NotRunning) { + m_process->closeWriteChannel(); + m_process->waitForFinished(200); m_process->close(); m_process->waitForFinished(); + cerr << "server exited" << endl; } delete m_process; } @@ -338,6 +341,23 @@ } (void)plugin->getRemainingFeatures(); + + cerr << "calling reset..." << endl; + plugin->reset(); + cerr << "...round 2!" << endl; + + std::vector<float> buf = { 1.0, -1.0, 1.0, -1.0 }; + float *bd = buf.data(); + Vamp::Plugin::FeatureSet features = plugin->process + (&bd, Vamp::RealTime::zeroTime); + cerr << "results for output 0:" << endl; + auto fl(features[0]); + for (const auto &f: fl) { + cerr << f.values[0] << endl; + } + + (void)plugin->getRemainingFeatures(); + delete plugin; //!!! -- and also implement reset(), which will need to reconstruct internally }