comparison vamp-client/client.cpp @ 149:70bf40743d6a

Update api usage in test client
author Chris Cannam <c.cannam@qmul.ac.uk>
date Thu, 19 Jan 2017 14:05:21 +0000
parents 183fe1f03980
children
comparison
equal deleted inserted replaced
148:c3b9a584b42b 149:70bf40743d6a
42 using std::cerr; 42 using std::cerr;
43 using std::endl; 43 using std::endl;
44 44
45 int main(int, char **) 45 int main(int, char **)
46 { 46 {
47 piper_vamp::client::ProcessQtTransport transport("../bin/piper-vamp-simple-server", 47 piper_vamp::client::ProcessQtTransport transport
48 "capnp"); 48 ("../bin/piper-vamp-simple-server", "capnp", nullptr);
49 piper_vamp::client::CapnpRRClient client(&transport); 49
50 piper_vamp::client::CapnpRRClient client(&transport, nullptr);
50 51
51 piper_vamp::ListResponse lr = client.listPluginData({}); 52 piper_vamp::ListResponse lr = client.listPluginData({});
52 cerr << "Plugins available:" << endl; 53 cerr << "Plugins available:" << endl;
53 int i = 1; 54 int i = 1;
54 for (const auto &p: lr.available) { 55 for (const auto &p: lr.available) {
95 96
96 delete plugin; 97 delete plugin;
97 98
98 // Let's try a crazy AutoPlugin 99 // Let's try a crazy AutoPlugin
99 100
100 piper_vamp::client::AutoPlugin ap("../bin/piper-vamp-simple-server", 101 piper_vamp::client::AutoPlugin ap
101 "vamp-example-plugins:zerocrossing", 16, 0); 102 ("../bin/piper-vamp-simple-server",
103 "vamp-example-plugins:zerocrossing", 16, 0, nullptr);
104
102 if (!ap.isOK()) { 105 if (!ap.isOK()) {
103 cerr << "AutoPlugin creation failed" << endl; 106 cerr << "AutoPlugin creation failed" << endl;
104 } else { 107 } else {
105 if (!ap.initialise(1, 4, 4)) { 108 if (!ap.initialise(1, 4, 4)) {
106 cerr << "initialisation failed" << endl; 109 cerr << "initialisation failed" << endl;