mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-08 20:40:11 +02:00
Add basic communication with a child process
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
#pragma once
|
||||
|
||||
#include <cinttypes>
|
||||
#include <msgpack.hpp>
|
||||
#include <optional>
|
||||
|
||||
/**
|
||||
* An event as dispatched by the VST host. These events will get forwarded to
|
||||
* the VST host process running under Wine. The fields here mirror those
|
||||
* arguments sent to the `AEffect::dispatch` function.
|
||||
*/
|
||||
struct Event {
|
||||
int32_t opcode;
|
||||
int32_t parameter;
|
||||
// TODO: This is an intptr_t, is this actually a poitner that should be
|
||||
// dereferenced?
|
||||
intptr_t value;
|
||||
float option;
|
||||
|
||||
MSGPACK_DEFINE(opcode, parameter, value, option)
|
||||
};
|
||||
|
||||
/**
|
||||
* AN instance of this should be sent back as a response to an incoming event.
|
||||
*/
|
||||
struct EventResult {
|
||||
/**
|
||||
* The result that should be returned from the dispatch function.
|
||||
*/
|
||||
intptr_t return_value;
|
||||
/**
|
||||
* If present, this should get written into the void pointer passed to the
|
||||
* dispatch function.
|
||||
*/
|
||||
std::optional<std::string> result;
|
||||
|
||||
// TODO: Add missing return value fields;
|
||||
|
||||
MSGPACK_DEFINE(return_value, result)
|
||||
};
|
||||
Reference in New Issue
Block a user