Move plugin bridge helper functions to utils.h

This commit is contained in:
Robbert van der Helm
2020-05-09 15:16:24 +02:00
parent d173ab9123
commit 9c19a1d01c
5 changed files with 403 additions and 354 deletions
+1 -24
View File
@@ -21,35 +21,12 @@
#include <boost/asio/io_context.hpp>
#include <boost/asio/local/stream_protocol.hpp>
#include <boost/asio/streambuf.hpp>
#include <boost/process/async_pipe.hpp>
#include <boost/process/child.hpp>
#include <mutex>
#include <thread>
#include "../common/logging.h"
/**
* Boost 1.72 was released with a known breaking bug caused by a missing
* typedef: https://github.com/boostorg/process/issues/116.
*
* Luckily this is easy to fix since it's not really possible to downgrade Boost
* as it would break other applications.
*
* Check if this is still needed for other distros after Arch starts packaging
* Boost 1.73.
*/
class patched_async_pipe : public boost::process::async_pipe {
public:
using boost::process::async_pipe::async_pipe;
typedef typename handle_type::executor_type executor_type;
};
/**
* A tag to differentiate between 32 and 64-bit plugins, used to determine which
* host application to use.
*/
enum class PluginArchitecture { vst_32, vst_64 };
#include "utils.h"
/**
* This handles the communication between the Linux native VST plugin and the