comparison vamp-server/server.cpp @ 109:c996610b8a46

Win32 build fix
author Chris Cannam <c.cannam@qmul.ac.uk>
date Mon, 24 Oct 2016 10:51:21 +0100
parents 491a4bc10a01
children b418b583fd3b
comparison
equal deleted inserted replaced
107:2586f4be738c 109:c996610b8a46
11 #include <capnp/serialize.h> 11 #include <capnp/serialize.h>
12 12
13 #include <map> 13 #include <map>
14 #include <set> 14 #include <set>
15 15
16 #include <unistd.h> // getpid for logging 16 // pid for logging
17 #ifdef _WIN32
18 #include <process.h>
19 static int pid = _getpid();
20 #else
21 #include <unistd.h>
22 static int pid = getpid();
23 #endif
17 24
18 using namespace std; 25 using namespace std;
19 using namespace piper_vamp; 26 using namespace piper_vamp;
20 using namespace Vamp; 27 using namespace Vamp;
21 28
22 //!!! This could be faster and lighter: 29 //!!! This could be faster and lighter:
23 // - Use Capnp structures directly rather than converting to vamp-support ones 30 // - Use Capnp structures directly rather than converting to vamp-support ones
24 // - Use Vamp C API (vamp.h) directly rather than converting to C++ 31 // - Use Vamp C API (vamp.h) directly rather than converting to C++
25 //!!! Doing the above for process() and finish() alone would be a good start 32 //!!! Doing the above for process() and finish() alone would be a good start
26 33
27 static int pid = getpid();
28
29 void usage() 34 void usage()
30 { 35 {
31 string myname = "piper-vamp-server"; 36 string myname = "piper-vamp-server";
32 cerr << "\n" << myname << 37 cerr << "\n" << myname <<
33 ": Load and run Vamp plugins in response to messages from stdin\n\n" 38 ": Load and run Vamp plugins in response to messages from stdin\n\n"