comparison 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
comparison
equal deleted inserted replaced
88:bf2e6f939f9f 89:03ed2e0a6c8f
49 } 49 }
50 50
51 ~PiperClient() { 51 ~PiperClient() {
52 if (m_process) { 52 if (m_process) {
53 if (m_process->state() != QProcess::NotRunning) { 53 if (m_process->state() != QProcess::NotRunning) {
54 m_process->closeWriteChannel();
55 m_process->waitForFinished(200);
54 m_process->close(); 56 m_process->close();
55 m_process->waitForFinished(); 57 m_process->waitForFinished();
58 cerr << "server exited" << endl;
56 } 59 }
57 delete m_process; 60 delete m_process;
58 } 61 }
59 } 62 }
60 63
336 cerr << f.values[0] << endl; 339 cerr << f.values[0] << endl;
337 } 340 }
338 } 341 }
339 342
340 (void)plugin->getRemainingFeatures(); 343 (void)plugin->getRemainingFeatures();
344
345 cerr << "calling reset..." << endl;
346 plugin->reset();
347 cerr << "...round 2!" << endl;
348
349 std::vector<float> buf = { 1.0, -1.0, 1.0, -1.0 };
350 float *bd = buf.data();
351 Vamp::Plugin::FeatureSet features = plugin->process
352 (&bd, Vamp::RealTime::zeroTime);
353 cerr << "results for output 0:" << endl;
354 auto fl(features[0]);
355 for (const auto &f: fl) {
356 cerr << f.values[0] << endl;
357 }
358
359 (void)plugin->getRemainingFeatures();
360
341 delete plugin; 361 delete plugin;
342 //!!! -- and also implement reset(), which will need to reconstruct internally 362 //!!! -- and also implement reset(), which will need to reconstruct internally
343 } 363 }
344 364