comparison vamp-client/qt/test.cpp @ 207:61034472c304

Rename methods to avoid referring to plugins in Piper-world
author Chris Cannam <cannam@all-day-breakfast.com>
date Thu, 09 Feb 2017 13:25:35 +0000
parents bf8e3e7dd7de
children c67a0a945b6b
comparison
equal deleted inserted replaced
205:587e9691a44e 207:61034472c304
58 return 1; 58 return 1;
59 } 59 }
60 60
61 piper_vamp::client::CapnpRRClient client(&transport, nullptr); 61 piper_vamp::client::CapnpRRClient client(&transport, nullptr);
62 62
63 piper_vamp::ListResponse lr = client.listPluginData({}); 63 piper_vamp::ListResponse lr = client.list({});
64 cerr << "Plugins available:" << endl; 64 cerr << "Plugins available:" << endl;
65 int i = 1; 65 int i = 1;
66 for (const auto &p: lr.available) { 66 for (const auto &p: lr.available) {
67 cerr << i++ << ". [" << p.pluginKey << "] " << p.basic.name << endl; 67 cerr << i++ << ". [" << p.pluginKey << "] " << p.basic.name << endl;
68 } 68 }
69 69
70 piper_vamp::LoadRequest req; 70 piper_vamp::LoadRequest req;
71 req.pluginKey = "vamp-example-plugins:zerocrossing"; 71 req.pluginKey = "vamp-example-plugins:zerocrossing";
72 req.inputSampleRate = 16; 72 req.inputSampleRate = 16;
73 piper_vamp::LoadResponse resp = client.loadPlugin(req); 73 piper_vamp::LoadResponse resp = client.load(req);
74 Vamp::Plugin *plugin = resp.plugin; 74 Vamp::Plugin *plugin = resp.plugin;
75 75
76 if (!plugin->initialise(1, 4, 4)) { 76 if (!plugin->initialise(1, 4, 4)) {
77 cerr << "initialisation failed" << endl; 77 cerr << "initialisation failed" << endl;
78 } else { 78 } else {