mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-08 20:40:11 +02:00
Change terminology from 'VST' to 'plugin'
This commit is contained in:
@@ -591,7 +591,7 @@ class AdHocSocketHandler {
|
||||
// As mentioned in `acceptor's` docstring, this acceptor will be
|
||||
// recreated in `receive_multi()` on another context, and
|
||||
// potentially on the other side of the connection in the case
|
||||
// where we're handling `vst_host_callback_` VST2 events
|
||||
// where we're handling `plugin_host_callback_` VST2 events
|
||||
acceptor_.reset();
|
||||
ghc::filesystem::remove(endpoint_.path());
|
||||
} else {
|
||||
@@ -869,10 +869,10 @@ class AdHocSocketHandler {
|
||||
* during `Sockets::connect()`. When `AdHocSocketHandler::receive_multi()`
|
||||
* is then called, we'll recreate the acceptor to asynchronously listen for
|
||||
* new incoming socket connections on `endpoint` using. This is important,
|
||||
* because on the case of `Vst2Sockets`'s' `vst_host_callback_` the acceptor
|
||||
* is first accepts an initial socket on the plugin side (like all sockets),
|
||||
* but all additional incoming connections of course have to be listened for
|
||||
* on the plugin side.
|
||||
* because on the case of `Vst2Sockets`'s' `plugin_host_callback_` the
|
||||
* acceptor is first accepts an initial socket on the plugin side (like all
|
||||
* sockets), but all additional incoming connections of course have to be
|
||||
* listened for on the plugin side.
|
||||
*/
|
||||
std::optional<asio::local::stream_protocol::acceptor> acceptor_;
|
||||
|
||||
@@ -1010,8 +1010,8 @@ class TypedMessageHandler : public AdHocSocketHandler<Thread> {
|
||||
// only print the responses when the request was not filtered out.
|
||||
bool should_log_response = false;
|
||||
if (logging) {
|
||||
auto [logger, is_host_vst] = *logging;
|
||||
should_log_response = logger.log_request(is_host_vst, object);
|
||||
auto [logger, is_host_plugin] = *logging;
|
||||
should_log_response = logger.log_request(is_host_plugin, object);
|
||||
}
|
||||
|
||||
// A socket only handles a single request at a time as to prevent
|
||||
@@ -1024,8 +1024,8 @@ class TypedMessageHandler : public AdHocSocketHandler<Thread> {
|
||||
});
|
||||
|
||||
if (should_log_response) {
|
||||
auto [logger, is_host_vst] = *logging;
|
||||
logger.log_response(!is_host_vst, response_object);
|
||||
auto [logger, is_host_plugin] = *logging;
|
||||
logger.log_response(!is_host_plugin, response_object);
|
||||
}
|
||||
|
||||
return response_object;
|
||||
@@ -1111,8 +1111,8 @@ class TypedMessageHandler : public AdHocSocketHandler<Thread> {
|
||||
if (logging) {
|
||||
should_log_response = std::visit(
|
||||
[&](const auto& object) {
|
||||
auto [logger, is_host_vst] = *logging;
|
||||
return logger.log_request(is_host_vst, object);
|
||||
auto [logger, is_host_plugin] = *logging;
|
||||
return logger.log_request(is_host_plugin, object);
|
||||
},
|
||||
// In the case of `AudioProcessorRequest`, we need to
|
||||
// actually fetch the variant field since our object
|
||||
@@ -1130,8 +1130,8 @@ class TypedMessageHandler : public AdHocSocketHandler<Thread> {
|
||||
typename T::Response response = callback(object);
|
||||
|
||||
if (should_log_response) {
|
||||
auto [logger, is_host_vst] = *logging;
|
||||
logger.log_response(!is_host_vst, response);
|
||||
auto [logger, is_host_plugin] = *logging;
|
||||
logger.log_response(!is_host_plugin, response);
|
||||
}
|
||||
|
||||
if constexpr (persistent_buffers) {
|
||||
|
||||
@@ -322,8 +322,8 @@ class Vst2EventHandler : public AdHocSocketHandler<Thread> {
|
||||
* Wine host when hosting a VST2 plugin.
|
||||
*
|
||||
* On the plugin side this class should be initialized with `listen` set to
|
||||
* `true` before launching the Wine VST host. This will start listening on the
|
||||
* sockets, and the call to `connect()` will then accept any incoming
|
||||
* `true` before launching the Wine plugin host. This will start listening on
|
||||
* the sockets, and the call to `connect()` will then accept any incoming
|
||||
* connections.
|
||||
*
|
||||
* @tparam Thread The thread implementation to use. On the Linux side this
|
||||
@@ -350,76 +350,79 @@ class Vst2Sockets final : public Sockets {
|
||||
const ghc::filesystem::path& endpoint_base_dir,
|
||||
bool listen)
|
||||
: Sockets(endpoint_base_dir),
|
||||
host_vst_dispatch_(io_context,
|
||||
(base_dir_ / "host_vst_dispatch.sock").string(),
|
||||
listen),
|
||||
vst_host_callback_(io_context,
|
||||
(base_dir_ / "vst_host_callback.sock").string(),
|
||||
listen),
|
||||
host_vst_parameters_(
|
||||
host_plugin_dispatch_(
|
||||
io_context,
|
||||
(base_dir_ / "host_vst_parameters.sock").string(),
|
||||
(base_dir_ / "host_plugin_dispatch.sock").string(),
|
||||
listen),
|
||||
host_vst_process_replacing_(
|
||||
plugin_host_callback_(
|
||||
io_context,
|
||||
(base_dir_ / "host_vst_process_replacing.sock").string(),
|
||||
(base_dir_ / "plugin_host_callback.sock").string(),
|
||||
listen),
|
||||
host_vst_control_(io_context,
|
||||
(base_dir_ / "host_vst_control.sock").string(),
|
||||
listen) {}
|
||||
host_plugin_parameters_(
|
||||
io_context,
|
||||
(base_dir_ / "host_plugin_parameters.sock").string(),
|
||||
listen),
|
||||
host_plugin_process_replacing_(
|
||||
io_context,
|
||||
(base_dir_ / "host_plugin_process_replacing.sock").string(),
|
||||
listen),
|
||||
host_plugin_control_(
|
||||
io_context,
|
||||
(base_dir_ / "host_plugin_control.sock").string(),
|
||||
listen) {}
|
||||
|
||||
~Vst2Sockets() noexcept override { close(); }
|
||||
|
||||
void connect() override {
|
||||
host_vst_dispatch_.connect();
|
||||
vst_host_callback_.connect();
|
||||
host_vst_parameters_.connect();
|
||||
host_vst_process_replacing_.connect();
|
||||
host_vst_control_.connect();
|
||||
host_plugin_dispatch_.connect();
|
||||
plugin_host_callback_.connect();
|
||||
host_plugin_parameters_.connect();
|
||||
host_plugin_process_replacing_.connect();
|
||||
host_plugin_control_.connect();
|
||||
}
|
||||
|
||||
void close() override {
|
||||
// Manually close all sockets so we break out of any blocking operations
|
||||
// that may still be active
|
||||
host_vst_dispatch_.close();
|
||||
vst_host_callback_.close();
|
||||
host_vst_parameters_.close();
|
||||
host_vst_process_replacing_.close();
|
||||
host_vst_control_.close();
|
||||
host_plugin_dispatch_.close();
|
||||
plugin_host_callback_.close();
|
||||
host_plugin_parameters_.close();
|
||||
host_plugin_process_replacing_.close();
|
||||
host_plugin_control_.close();
|
||||
}
|
||||
|
||||
// The naming convention for these sockets is `<from>_<to>_<event>`. For
|
||||
// instance the socket named `host_vst_dispatch` forwards
|
||||
// instance the socket named `host_plugin_dispatch` forwards
|
||||
// `AEffect.dispatch()` calls from the native VST host to the Windows VST
|
||||
// plugin (through the Wine VST host).
|
||||
// plugin (through the Wine plugin host).
|
||||
|
||||
/**
|
||||
* The socket that forwards all `dispatcher()` calls from the VST host to
|
||||
* the plugin.
|
||||
*/
|
||||
Vst2EventHandler<Thread> host_vst_dispatch_;
|
||||
Vst2EventHandler<Thread> host_plugin_dispatch_;
|
||||
/**
|
||||
* The socket that forwards all `audioMaster()` calls from the Windows VST
|
||||
* plugin to the host.
|
||||
*/
|
||||
Vst2EventHandler<Thread> vst_host_callback_;
|
||||
Vst2EventHandler<Thread> plugin_host_callback_;
|
||||
/**
|
||||
* Used for both `getParameter` and `setParameter` since they mostly
|
||||
* overlap.
|
||||
*/
|
||||
SocketHandler host_vst_parameters_;
|
||||
SocketHandler host_plugin_parameters_;
|
||||
/**
|
||||
* Used for processing audio usign the `process()`, `processReplacing()` and
|
||||
* `processDoubleReplacing()` functions.
|
||||
*/
|
||||
SocketHandler host_vst_process_replacing_;
|
||||
SocketHandler host_plugin_process_replacing_;
|
||||
/**
|
||||
* A control socket that sends data that is not suitable for the other
|
||||
* sockets. At the moment this is only used to, on startup, send the Windows
|
||||
* VST plugin's `AEffect` object to the native VST plugin, and to then send
|
||||
* the configuration (from `config_`) back to the Wine host.
|
||||
*/
|
||||
SocketHandler host_vst_control_;
|
||||
SocketHandler host_plugin_control_;
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
@@ -28,8 +28,8 @@
|
||||
* Wine host when hosting a VST3 plugin.
|
||||
*
|
||||
* On the plugin side this class should be initialized with `listen` set to
|
||||
* `true` before launching the Wine VST host. This will start listening on the
|
||||
* sockets, and the call to `connect()` will then accept any incoming
|
||||
* `true` before launching the Wine plugin host. This will start listening on
|
||||
* the sockets, and the call to `connect()` will then accept any incoming
|
||||
* connections.
|
||||
*
|
||||
* We'll have a host -> plugin connection for sending control messages (which is
|
||||
@@ -66,27 +66,29 @@ class Vst3Sockets final : public Sockets {
|
||||
const ghc::filesystem::path& endpoint_base_dir,
|
||||
bool listen)
|
||||
: Sockets(endpoint_base_dir),
|
||||
host_vst_control_(io_context,
|
||||
(base_dir_ / "host_vst_control.sock").string(),
|
||||
listen),
|
||||
vst_host_callback_(io_context,
|
||||
(base_dir_ / "vst_host_callback.sock").string(),
|
||||
listen),
|
||||
host_plugin_control_(
|
||||
io_context,
|
||||
(base_dir_ / "host_plugin_control.sock").string(),
|
||||
listen),
|
||||
plugin_host_callback_(
|
||||
io_context,
|
||||
(base_dir_ / "plugin_host_callback.sock").string(),
|
||||
listen),
|
||||
io_context_(io_context) {}
|
||||
|
||||
// NOLINTNEXTLINE(clang-analyzer-optin.cplusplus.VirtualCall)
|
||||
~Vst3Sockets() noexcept override { close(); }
|
||||
|
||||
void connect() override {
|
||||
host_vst_control_.connect();
|
||||
vst_host_callback_.connect();
|
||||
host_plugin_control_.connect();
|
||||
plugin_host_callback_.connect();
|
||||
}
|
||||
|
||||
void close() override {
|
||||
// Manually close all sockets so we break out of any blocking operations
|
||||
// that may still be active
|
||||
host_vst_control_.close();
|
||||
vst_host_callback_.close();
|
||||
host_plugin_control_.close();
|
||||
plugin_host_callback_.close();
|
||||
|
||||
// This map should be empty at this point, but who knows
|
||||
std::lock_guard lock(audio_processor_sockets_mutex_);
|
||||
@@ -106,7 +108,7 @@ class Vst3Sockets final : public Sockets {
|
||||
std::lock_guard lock(audio_processor_sockets_mutex_);
|
||||
audio_processor_sockets_.try_emplace(
|
||||
instance_id, io_context_,
|
||||
(base_dir_ / ("host_vst_audio_processor_" +
|
||||
(base_dir_ / ("host_plugin_audio_processor_" +
|
||||
std::to_string(instance_id) + ".sock"))
|
||||
.string(),
|
||||
false);
|
||||
@@ -140,7 +142,7 @@ class Vst3Sockets final : public Sockets {
|
||||
std::lock_guard lock(audio_processor_sockets_mutex_);
|
||||
audio_processor_sockets_.try_emplace(
|
||||
instance_id, io_context_,
|
||||
(base_dir_ / ("host_vst_audio_processor_" +
|
||||
(base_dir_ / ("host_plugin_audio_processor_" +
|
||||
std::to_string(instance_id) + ".sock"))
|
||||
.string(),
|
||||
true);
|
||||
@@ -237,14 +239,16 @@ class Vst3Sockets final : public Sockets {
|
||||
* This will be listened on by the Wine plugin host when it calls
|
||||
* `receive_multi()`.
|
||||
*/
|
||||
TypedMessageHandler<Thread, Vst3Logger, ControlRequest> host_vst_control_;
|
||||
TypedMessageHandler<Thread, Vst3Logger, ControlRequest>
|
||||
host_plugin_control_;
|
||||
|
||||
/**
|
||||
* For sending callbacks from the plugin back to the host. After we have a
|
||||
* better idea of what our communication model looks like we'll probably
|
||||
* want to provide an abstraction similar to `Vst2EventHandler`.
|
||||
*/
|
||||
TypedMessageHandler<Thread, Vst3Logger, CallbackRequest> vst_host_callback_;
|
||||
TypedMessageHandler<Thread, Vst3Logger, CallbackRequest>
|
||||
plugin_host_callback_;
|
||||
|
||||
private:
|
||||
/**
|
||||
|
||||
@@ -31,8 +31,8 @@
|
||||
* they can share resources. Configuration file loading works as follows:
|
||||
*
|
||||
* 1. `load_config_for(path)` from `src/plugin/utils.h` gets called with a path
|
||||
* to the copy of or symlink to `libyabridge-{clap,vst2,vst3}.so` that the plugin
|
||||
* host has tried to load.
|
||||
* to the copy of or symlink to `libyabridge-{clap,vst2,vst3}.so` that the
|
||||
* plugin host has tried to load.
|
||||
* 2. We start looking for a file named `yabridge.toml` in the same directory as
|
||||
* that `.so` file, iteratively continuing to search one directory higher
|
||||
* until we either find the file or we reach the filesystem root.
|
||||
|
||||
@@ -23,10 +23,10 @@
|
||||
|
||||
/**
|
||||
* Return a path to this `.so` file. This can be used to find out from where
|
||||
* this copy of `libyabridge-{clap,vst2,vst3}.so` or `libyabridge-chainloader-*.so`
|
||||
* was loaded so we can search for a matching Windows plugin library. When the
|
||||
* chainloaders are used, this path should be passed to the chainloaded plugin
|
||||
* library using the provided exported functions since they can't detect the
|
||||
* path themselves.
|
||||
* this copy of `libyabridge-{clap,vst2,vst3}.so` or
|
||||
* `libyabridge-chainloader-*.so` was loaded so we can search for a matching
|
||||
* Windows plugin library. When the chainloaders are used, this path should be
|
||||
* passed to the chainloaded plugin library using the provided exported
|
||||
* functions since they can't detect the path themselves.
|
||||
*/
|
||||
ghc::filesystem::path get_this_file_location();
|
||||
|
||||
@@ -86,8 +86,8 @@ class Logger {
|
||||
* editor window handling. If we end up adding more of these options, we
|
||||
* should move to a bitfield or something.
|
||||
* @param prefix An optional prefix for the logger. Useful for differentiate
|
||||
* messages coming from the Wine VST host. Should end with a single space
|
||||
* character.
|
||||
* messages coming from the Wine plugin host. Should end with a single
|
||||
* space character.
|
||||
* @param prefix_timestamp Whether the log messages should be prefixed with
|
||||
* a timestamp. The timestamp is added before `prefix`. This is set to
|
||||
* `false` in `create_wine_stderr()` because otherwise you would end up
|
||||
|
||||
+314
-313
File diff suppressed because it is too large
Load Diff
+181
-164
@@ -60,280 +60,297 @@ class Vst3Logger {
|
||||
// way we can filter out the log message for the response together with the
|
||||
// request.
|
||||
|
||||
bool log_request(bool is_host_vst,
|
||||
bool log_request(bool is_host_plugin,
|
||||
const Vst3PluginFactoryProxy::Construct&);
|
||||
bool log_request(bool is_host_vst, const Vst3PlugViewProxy::Destruct&);
|
||||
bool log_request(bool is_host_vst, const Vst3PluginProxy::Construct&);
|
||||
bool log_request(bool is_host_vst, const Vst3PluginProxy::Destruct&);
|
||||
bool log_request(bool is_host_vst, const Vst3PluginProxy::Initialize&);
|
||||
bool log_request(bool is_host_vst, const Vst3PluginProxy::SetState&);
|
||||
bool log_request(bool is_host_vst, const Vst3PluginProxy::GetState&);
|
||||
bool log_request(bool is_host_plugin, const Vst3PlugViewProxy::Destruct&);
|
||||
bool log_request(bool is_host_plugin, const Vst3PluginProxy::Construct&);
|
||||
bool log_request(bool is_host_plugin, const Vst3PluginProxy::Destruct&);
|
||||
bool log_request(bool is_host_plugin, const Vst3PluginProxy::Initialize&);
|
||||
bool log_request(bool is_host_plugin, const Vst3PluginProxy::SetState&);
|
||||
bool log_request(bool is_host_plugin, const Vst3PluginProxy::GetState&);
|
||||
bool log_request(
|
||||
bool is_host_vst,
|
||||
bool is_host_plugin,
|
||||
const YaAudioPresentationLatency::SetAudioPresentationLatencySamples&);
|
||||
bool log_request(bool is_host_vst,
|
||||
bool log_request(bool is_host_plugin,
|
||||
const YaAutomationState::SetAutomationState&);
|
||||
bool log_request(bool is_host_vst, const YaConnectionPoint::Connect&);
|
||||
bool log_request(bool is_host_vst, const YaConnectionPoint::Disconnect&);
|
||||
bool log_request(bool is_host_vst, const YaConnectionPoint::Notify&);
|
||||
bool log_request(bool is_host_vst,
|
||||
bool log_request(bool is_host_plugin, const YaConnectionPoint::Connect&);
|
||||
bool log_request(bool is_host_plugin, const YaConnectionPoint::Disconnect&);
|
||||
bool log_request(bool is_host_plugin, const YaConnectionPoint::Notify&);
|
||||
bool log_request(bool is_host_plugin,
|
||||
const YaContextMenuTarget::ExecuteMenuItem&);
|
||||
bool log_request(bool is_host_vst,
|
||||
bool log_request(bool is_host_plugin,
|
||||
const YaEditController::SetComponentState&);
|
||||
bool log_request(bool is_host_vst,
|
||||
bool log_request(bool is_host_plugin,
|
||||
const YaEditController::GetParameterCount&);
|
||||
bool log_request(bool is_host_vst,
|
||||
bool log_request(bool is_host_plugin,
|
||||
const YaEditController::GetParameterInfo&);
|
||||
bool log_request(bool is_host_vst,
|
||||
bool log_request(bool is_host_plugin,
|
||||
const YaEditController::GetParamStringByValue&);
|
||||
bool log_request(bool is_host_vst,
|
||||
bool log_request(bool is_host_plugin,
|
||||
const YaEditController::GetParamValueByString&);
|
||||
bool log_request(bool is_host_vst,
|
||||
bool log_request(bool is_host_plugin,
|
||||
const YaEditController::NormalizedParamToPlain&);
|
||||
bool log_request(bool is_host_vst,
|
||||
bool log_request(bool is_host_plugin,
|
||||
const YaEditController::PlainParamToNormalized&);
|
||||
bool log_request(bool is_host_vst,
|
||||
bool log_request(bool is_host_plugin,
|
||||
const YaEditController::GetParamNormalized&);
|
||||
bool log_request(bool is_host_vst,
|
||||
bool log_request(bool is_host_plugin,
|
||||
const YaEditController::SetParamNormalized&);
|
||||
bool log_request(bool is_host_vst,
|
||||
bool log_request(bool is_host_plugin,
|
||||
const YaEditController::SetComponentHandler&);
|
||||
bool log_request(bool is_host_vst, const YaEditController::CreateView&);
|
||||
bool log_request(bool is_host_vst, const YaEditController2::SetKnobMode&);
|
||||
bool log_request(bool is_host_vst, const YaEditController2::OpenHelp&);
|
||||
bool log_request(bool is_host_vst, const YaEditController2::OpenAboutBox&);
|
||||
bool log_request(bool is_host_vst,
|
||||
bool log_request(bool is_host_plugin, const YaEditController::CreateView&);
|
||||
bool log_request(bool is_host_plugin,
|
||||
const YaEditController2::SetKnobMode&);
|
||||
bool log_request(bool is_host_plugin, const YaEditController2::OpenHelp&);
|
||||
bool log_request(bool is_host_plugin,
|
||||
const YaEditController2::OpenAboutBox&);
|
||||
bool log_request(bool is_host_plugin,
|
||||
const YaEditControllerHostEditing::BeginEditFromHost&);
|
||||
bool log_request(bool is_host_vst,
|
||||
bool log_request(bool is_host_plugin,
|
||||
const YaEditControllerHostEditing::EndEditFromHost&);
|
||||
bool log_request(bool is_host_vst,
|
||||
bool log_request(bool is_host_plugin,
|
||||
const YaInfoListener::SetChannelContextInfos&);
|
||||
bool log_request(bool is_host_vst,
|
||||
bool log_request(bool is_host_plugin,
|
||||
const YaKeyswitchController::GetKeyswitchCount&);
|
||||
bool log_request(bool is_host_vst,
|
||||
bool log_request(bool is_host_plugin,
|
||||
const YaKeyswitchController::GetKeyswitchInfo&);
|
||||
bool log_request(bool is_host_vst,
|
||||
bool log_request(bool is_host_plugin,
|
||||
const YaMidiLearn::OnLiveMIDIControllerInput&);
|
||||
bool log_request(bool is_host_vst,
|
||||
bool log_request(bool is_host_plugin,
|
||||
const YaMidiMapping::GetMidiControllerAssignment&);
|
||||
bool log_request(bool is_host_vst,
|
||||
bool log_request(bool is_host_plugin,
|
||||
const YaNoteExpressionController::GetNoteExpressionCount&);
|
||||
bool log_request(bool is_host_vst,
|
||||
bool log_request(bool is_host_plugin,
|
||||
const YaNoteExpressionController::GetNoteExpressionInfo&);
|
||||
bool log_request(
|
||||
bool is_host_vst,
|
||||
bool is_host_plugin,
|
||||
const YaNoteExpressionController::GetNoteExpressionStringByValue&);
|
||||
bool log_request(
|
||||
bool is_host_vst,
|
||||
bool is_host_plugin,
|
||||
const YaNoteExpressionController::GetNoteExpressionValueByString&);
|
||||
bool log_request(
|
||||
bool is_host_vst,
|
||||
bool is_host_plugin,
|
||||
const YaNoteExpressionPhysicalUIMapping::GetNotePhysicalUIMapping&);
|
||||
bool log_request(bool is_host_vst, const YaParameterFinder::FindParameter&);
|
||||
bool log_request(bool is_host_plugin,
|
||||
const YaParameterFinder::FindParameter&);
|
||||
bool log_request(
|
||||
bool is_host_vst,
|
||||
bool is_host_plugin,
|
||||
const YaParameterFunctionName::GetParameterIDFromFunctionName&);
|
||||
bool log_request(bool is_host_vst,
|
||||
bool log_request(bool is_host_plugin,
|
||||
const YaPlugView::IsPlatformTypeSupported&);
|
||||
bool log_request(bool is_host_vst, const YaPlugView::Attached&);
|
||||
bool log_request(bool is_host_vst, const YaPlugView::Removed&);
|
||||
bool log_request(bool is_host_vst, const YaPlugView::OnWheel&);
|
||||
bool log_request(bool is_host_vst, const YaPlugView::OnKeyDown&);
|
||||
bool log_request(bool is_host_vst, const YaPlugView::OnKeyUp&);
|
||||
bool log_request(bool is_host_vst, const YaPlugView::GetSize&);
|
||||
bool log_request(bool is_host_vst, const YaPlugView::OnSize&);
|
||||
bool log_request(bool is_host_vst, const YaPlugView::OnFocus&);
|
||||
bool log_request(bool is_host_vst, const YaPlugView::SetFrame&);
|
||||
bool log_request(bool is_host_vst, const YaPlugView::CanResize&);
|
||||
bool log_request(bool is_host_vst, const YaPlugView::CheckSizeConstraint&);
|
||||
bool log_request(bool is_host_plugin, const YaPlugView::Attached&);
|
||||
bool log_request(bool is_host_plugin, const YaPlugView::Removed&);
|
||||
bool log_request(bool is_host_plugin, const YaPlugView::OnWheel&);
|
||||
bool log_request(bool is_host_plugin, const YaPlugView::OnKeyDown&);
|
||||
bool log_request(bool is_host_plugin, const YaPlugView::OnKeyUp&);
|
||||
bool log_request(bool is_host_plugin, const YaPlugView::GetSize&);
|
||||
bool log_request(bool is_host_plugin, const YaPlugView::OnSize&);
|
||||
bool log_request(bool is_host_plugin, const YaPlugView::OnFocus&);
|
||||
bool log_request(bool is_host_plugin, const YaPlugView::SetFrame&);
|
||||
bool log_request(bool is_host_plugin, const YaPlugView::CanResize&);
|
||||
bool log_request(bool is_host_plugin,
|
||||
const YaPlugView::CheckSizeConstraint&);
|
||||
bool log_request(
|
||||
bool is_host_vst,
|
||||
bool is_host_plugin,
|
||||
const YaPlugViewContentScaleSupport::SetContentScaleFactor&);
|
||||
bool log_request(bool is_host_vst, const YaPluginBase::Terminate&);
|
||||
bool log_request(bool is_host_vst, const YaPluginFactory3::SetHostContext&);
|
||||
bool log_request(bool is_host_plugin, const YaPluginBase::Terminate&);
|
||||
bool log_request(bool is_host_plugin,
|
||||
const YaPluginFactory3::SetHostContext&);
|
||||
bool log_request(
|
||||
bool is_host_vst,
|
||||
bool is_host_plugin,
|
||||
const YaProcessContextRequirements::GetProcessContextRequirements&);
|
||||
bool log_request(bool is_host_vst,
|
||||
bool log_request(bool is_host_plugin,
|
||||
const YaProgramListData::ProgramDataSupported&);
|
||||
bool log_request(bool is_host_vst,
|
||||
bool log_request(bool is_host_plugin,
|
||||
const YaProgramListData::GetProgramData&);
|
||||
bool log_request(bool is_host_vst,
|
||||
bool log_request(bool is_host_plugin,
|
||||
const YaProgramListData::SetProgramData&);
|
||||
bool log_request(bool is_host_vst, const YaUnitData::UnitDataSupported&);
|
||||
bool log_request(bool is_host_vst, const YaUnitData::GetUnitData&);
|
||||
bool log_request(bool is_host_vst, const YaUnitData::SetUnitData&);
|
||||
bool log_request(bool is_host_vst, const YaUnitInfo::GetUnitCount&);
|
||||
bool log_request(bool is_host_vst, const YaUnitInfo::GetUnitInfo&);
|
||||
bool log_request(bool is_host_vst, const YaUnitInfo::GetProgramListCount&);
|
||||
bool log_request(bool is_host_vst, const YaUnitInfo::GetProgramListInfo&);
|
||||
bool log_request(bool is_host_vst, const YaUnitInfo::GetProgramName&);
|
||||
bool log_request(bool is_host_vst, const YaUnitInfo::GetProgramInfo&);
|
||||
bool log_request(bool is_host_vst, const YaUnitInfo::HasProgramPitchNames&);
|
||||
bool log_request(bool is_host_vst, const YaUnitInfo::GetProgramPitchName&);
|
||||
bool log_request(bool is_host_vst, const YaUnitInfo::GetSelectedUnit&);
|
||||
bool log_request(bool is_host_vst, const YaUnitInfo::SelectUnit&);
|
||||
bool log_request(bool is_host_vst, const YaUnitInfo::GetUnitByBus&);
|
||||
bool log_request(bool is_host_vst, const YaUnitInfo::SetUnitProgramData&);
|
||||
bool log_request(bool is_host_plugin, const YaUnitData::UnitDataSupported&);
|
||||
bool log_request(bool is_host_plugin, const YaUnitData::GetUnitData&);
|
||||
bool log_request(bool is_host_plugin, const YaUnitData::SetUnitData&);
|
||||
bool log_request(bool is_host_plugin, const YaUnitInfo::GetUnitCount&);
|
||||
bool log_request(bool is_host_plugin, const YaUnitInfo::GetUnitInfo&);
|
||||
bool log_request(bool is_host_plugin,
|
||||
const YaUnitInfo::GetProgramListCount&);
|
||||
bool log_request(bool is_host_plugin,
|
||||
const YaUnitInfo::GetProgramListInfo&);
|
||||
bool log_request(bool is_host_plugin, const YaUnitInfo::GetProgramName&);
|
||||
bool log_request(bool is_host_plugin, const YaUnitInfo::GetProgramInfo&);
|
||||
bool log_request(bool is_host_plugin,
|
||||
const YaUnitInfo::HasProgramPitchNames&);
|
||||
bool log_request(bool is_host_plugin,
|
||||
const YaUnitInfo::GetProgramPitchName&);
|
||||
bool log_request(bool is_host_plugin, const YaUnitInfo::GetSelectedUnit&);
|
||||
bool log_request(bool is_host_plugin, const YaUnitInfo::SelectUnit&);
|
||||
bool log_request(bool is_host_plugin, const YaUnitInfo::GetUnitByBus&);
|
||||
bool log_request(bool is_host_plugin,
|
||||
const YaUnitInfo::SetUnitProgramData&);
|
||||
bool log_request(
|
||||
bool is_host_vst,
|
||||
bool is_host_plugin,
|
||||
const YaXmlRepresentationController::GetXmlRepresentationStream&);
|
||||
|
||||
bool log_request(bool is_host_vst,
|
||||
bool log_request(bool is_host_plugin,
|
||||
const YaAudioProcessor::SetBusArrangements&);
|
||||
bool log_request(bool is_host_vst,
|
||||
bool log_request(bool is_host_plugin,
|
||||
const YaAudioProcessor::GetBusArrangement&);
|
||||
bool log_request(bool is_host_vst,
|
||||
bool log_request(bool is_host_plugin,
|
||||
const YaAudioProcessor::CanProcessSampleSize&);
|
||||
bool log_request(bool is_host_vst,
|
||||
bool log_request(bool is_host_plugin,
|
||||
const YaAudioProcessor::GetLatencySamples&);
|
||||
bool log_request(bool is_host_vst,
|
||||
bool log_request(bool is_host_plugin,
|
||||
const YaAudioProcessor::SetupProcessing&);
|
||||
bool log_request(bool is_host_vst, const YaAudioProcessor::SetProcessing&);
|
||||
bool log_request(bool is_host_vst,
|
||||
bool log_request(bool is_host_plugin,
|
||||
const YaAudioProcessor::SetProcessing&);
|
||||
bool log_request(bool is_host_plugin,
|
||||
const MessageReference<YaAudioProcessor::Process>&);
|
||||
bool log_request(bool is_host_vst, const YaAudioProcessor::GetTailSamples&);
|
||||
bool log_request(bool is_host_vst,
|
||||
bool log_request(bool is_host_plugin,
|
||||
const YaAudioProcessor::GetTailSamples&);
|
||||
bool log_request(bool is_host_plugin,
|
||||
const YaComponent::GetControllerClassId&);
|
||||
bool log_request(bool is_host_vst, const YaComponent::SetIoMode&);
|
||||
bool log_request(bool is_host_vst, const YaComponent::GetBusCount&);
|
||||
bool log_request(bool is_host_vst, const YaComponent::GetBusInfo&);
|
||||
bool log_request(bool is_host_vst, const YaComponent::GetRoutingInfo&);
|
||||
bool log_request(bool is_host_vst, const YaComponent::ActivateBus&);
|
||||
bool log_request(bool is_host_vst, const YaComponent::SetActive&);
|
||||
bool log_request(bool is_host_vst,
|
||||
bool log_request(bool is_host_plugin, const YaComponent::SetIoMode&);
|
||||
bool log_request(bool is_host_plugin, const YaComponent::GetBusCount&);
|
||||
bool log_request(bool is_host_plugin, const YaComponent::GetBusInfo&);
|
||||
bool log_request(bool is_host_plugin, const YaComponent::GetRoutingInfo&);
|
||||
bool log_request(bool is_host_plugin, const YaComponent::ActivateBus&);
|
||||
bool log_request(bool is_host_plugin, const YaComponent::SetActive&);
|
||||
bool log_request(bool is_host_plugin,
|
||||
const YaPrefetchableSupport::GetPrefetchableSupport&);
|
||||
|
||||
bool log_request(bool is_host_vst, const Vst3ContextMenuProxy::Destruct&);
|
||||
bool log_request(bool is_host_vst, const WantsConfiguration&);
|
||||
bool log_request(bool is_host_vst, const YaComponentHandler::BeginEdit&);
|
||||
bool log_request(bool is_host_vst, const YaComponentHandler::PerformEdit&);
|
||||
bool log_request(bool is_host_vst, const YaComponentHandler::EndEdit&);
|
||||
bool log_request(bool is_host_vst,
|
||||
bool log_request(bool is_host_plugin,
|
||||
const Vst3ContextMenuProxy::Destruct&);
|
||||
bool log_request(bool is_host_plugin, const WantsConfiguration&);
|
||||
bool log_request(bool is_host_plugin, const YaComponentHandler::BeginEdit&);
|
||||
bool log_request(bool is_host_plugin,
|
||||
const YaComponentHandler::PerformEdit&);
|
||||
bool log_request(bool is_host_plugin, const YaComponentHandler::EndEdit&);
|
||||
bool log_request(bool is_host_plugin,
|
||||
const YaComponentHandler::RestartComponent&);
|
||||
bool log_request(bool is_host_vst, const YaComponentHandler2::SetDirty&);
|
||||
bool log_request(bool is_host_vst,
|
||||
bool log_request(bool is_host_plugin, const YaComponentHandler2::SetDirty&);
|
||||
bool log_request(bool is_host_plugin,
|
||||
const YaComponentHandler2::RequestOpenEditor&);
|
||||
bool log_request(bool is_host_vst,
|
||||
bool log_request(bool is_host_plugin,
|
||||
const YaComponentHandler2::StartGroupEdit&);
|
||||
bool log_request(bool is_host_vst,
|
||||
bool log_request(bool is_host_plugin,
|
||||
const YaComponentHandler2::FinishGroupEdit&);
|
||||
bool log_request(bool is_host_vst,
|
||||
bool log_request(bool is_host_plugin,
|
||||
const YaComponentHandler3::CreateContextMenu&);
|
||||
bool log_request(
|
||||
bool is_host_vst,
|
||||
bool is_host_plugin,
|
||||
const YaComponentHandlerBusActivation::RequestBusActivation&);
|
||||
bool log_request(bool is_host_vst, const YaContextMenu::AddItem&);
|
||||
bool log_request(bool is_host_vst, const YaContextMenu::RemoveItem&);
|
||||
bool log_request(bool is_host_vst, const YaContextMenu::Popup&);
|
||||
bool log_request(bool is_host_vst, const YaHostApplication::GetName&);
|
||||
bool log_request(bool is_host_vst, const YaPlugFrame::ResizeView&);
|
||||
bool log_request(bool is_host_vst,
|
||||
bool log_request(bool is_host_plugin, const YaContextMenu::AddItem&);
|
||||
bool log_request(bool is_host_plugin, const YaContextMenu::RemoveItem&);
|
||||
bool log_request(bool is_host_plugin, const YaContextMenu::Popup&);
|
||||
bool log_request(bool is_host_plugin, const YaHostApplication::GetName&);
|
||||
bool log_request(bool is_host_plugin, const YaPlugFrame::ResizeView&);
|
||||
bool log_request(bool is_host_plugin,
|
||||
const YaPlugInterfaceSupport::IsPlugInterfaceSupported&);
|
||||
bool log_request(bool is_host_vst, const YaProgress::Start&);
|
||||
bool log_request(bool is_host_vst, const YaProgress::Update&);
|
||||
bool log_request(bool is_host_vst, const YaProgress::Finish&);
|
||||
bool log_request(bool is_host_vst,
|
||||
bool log_request(bool is_host_plugin, const YaProgress::Start&);
|
||||
bool log_request(bool is_host_plugin, const YaProgress::Update&);
|
||||
bool log_request(bool is_host_plugin, const YaProgress::Finish&);
|
||||
bool log_request(bool is_host_plugin,
|
||||
const YaUnitHandler::NotifyUnitSelection&);
|
||||
bool log_request(bool is_host_vst,
|
||||
bool log_request(bool is_host_plugin,
|
||||
const YaUnitHandler::NotifyProgramListChange&);
|
||||
bool log_request(bool is_host_vst,
|
||||
bool log_request(bool is_host_plugin,
|
||||
const YaUnitHandler2::NotifyUnitByBusChange&);
|
||||
|
||||
void log_response(bool is_host_vst, const Ack&);
|
||||
void log_response(bool is_host_vst,
|
||||
void log_response(bool is_host_plugin, const Ack&);
|
||||
void log_response(bool is_host_plugin,
|
||||
const UniversalTResult&,
|
||||
bool from_cache = false);
|
||||
void log_response(bool is_host_vst,
|
||||
void log_response(bool is_host_plugin,
|
||||
const Vst3PluginFactoryProxy::ConstructArgs&);
|
||||
void log_response(
|
||||
bool is_host_vst,
|
||||
bool is_host_plugin,
|
||||
const std::variant<Vst3PluginProxy::ConstructArgs, UniversalTResult>&);
|
||||
void log_response(bool is_host_vst,
|
||||
void log_response(bool is_host_plugin,
|
||||
const Vst3PluginProxy::InitializeResponse&);
|
||||
void log_response(bool is_host_vst,
|
||||
void log_response(bool is_host_plugin,
|
||||
const Vst3PluginProxy::GetStateResponse&);
|
||||
void log_response(bool is_host_vst,
|
||||
void log_response(bool is_host_plugin,
|
||||
const YaEditController::GetParameterInfoResponse&,
|
||||
bool from_cache = false);
|
||||
void log_response(bool is_host_vst,
|
||||
void log_response(bool is_host_plugin,
|
||||
const YaEditController::GetParamStringByValueResponse&);
|
||||
void log_response(bool is_host_vst,
|
||||
void log_response(bool is_host_plugin,
|
||||
const YaEditController::GetParamValueByStringResponse&);
|
||||
void log_response(bool is_host_vst,
|
||||
void log_response(bool is_host_plugin,
|
||||
const YaEditController::CreateViewResponse&);
|
||||
void log_response(bool is_host_vst,
|
||||
void log_response(bool is_host_plugin,
|
||||
const YaKeyswitchController::GetKeyswitchInfoResponse&);
|
||||
void log_response(
|
||||
bool is_host_vst,
|
||||
bool is_host_plugin,
|
||||
const YaMidiMapping::GetMidiControllerAssignmentResponse&);
|
||||
void log_response(
|
||||
bool is_host_vst,
|
||||
bool is_host_plugin,
|
||||
const YaNoteExpressionController::GetNoteExpressionInfoResponse&);
|
||||
void log_response(bool is_host_vst,
|
||||
void log_response(bool is_host_plugin,
|
||||
const YaNoteExpressionController::
|
||||
GetNoteExpressionStringByValueResponse&);
|
||||
void log_response(bool is_host_vst,
|
||||
void log_response(bool is_host_plugin,
|
||||
const YaNoteExpressionController::
|
||||
GetNoteExpressionValueByStringResponse&);
|
||||
void log_response(bool is_host_vst,
|
||||
void log_response(bool is_host_plugin,
|
||||
const YaNoteExpressionPhysicalUIMapping::
|
||||
GetNotePhysicalUIMappingResponse&);
|
||||
void log_response(bool is_host_vst,
|
||||
void log_response(bool is_host_plugin,
|
||||
const YaParameterFinder::FindParameterResponse&);
|
||||
void log_response(
|
||||
bool is_host_vst,
|
||||
bool is_host_plugin,
|
||||
const YaParameterFunctionName::GetParameterIDFromFunctionNameResponse&);
|
||||
void log_response(bool is_host_vst, const YaPlugView::GetSizeResponse&);
|
||||
void log_response(bool is_host_vst,
|
||||
void log_response(bool is_host_plugin, const YaPlugView::GetSizeResponse&);
|
||||
void log_response(bool is_host_plugin,
|
||||
const YaPlugView::CheckSizeConstraintResponse&);
|
||||
void log_response(bool is_host_vst, const Configuration&);
|
||||
void log_response(bool is_host_vst,
|
||||
void log_response(bool is_host_plugin, const Configuration&);
|
||||
void log_response(bool is_host_plugin,
|
||||
const YaProgramListData::GetProgramDataResponse&);
|
||||
void log_response(bool is_host_vst, const YaUnitData::GetUnitDataResponse&);
|
||||
void log_response(bool is_host_vst, const YaUnitInfo::GetUnitInfoResponse&);
|
||||
void log_response(bool is_host_vst,
|
||||
void log_response(bool is_host_plugin,
|
||||
const YaUnitData::GetUnitDataResponse&);
|
||||
void log_response(bool is_host_plugin,
|
||||
const YaUnitInfo::GetUnitInfoResponse&);
|
||||
void log_response(bool is_host_plugin,
|
||||
const YaUnitInfo::GetProgramListInfoResponse&);
|
||||
void log_response(bool is_host_vst,
|
||||
void log_response(bool is_host_plugin,
|
||||
const YaUnitInfo::GetProgramNameResponse&);
|
||||
void log_response(bool is_host_vst,
|
||||
void log_response(bool is_host_plugin,
|
||||
const YaUnitInfo::GetProgramInfoResponse&);
|
||||
void log_response(bool is_host_vst,
|
||||
void log_response(bool is_host_plugin,
|
||||
const YaUnitInfo::GetProgramPitchNameResponse&);
|
||||
void log_response(bool is_host_vst,
|
||||
void log_response(bool is_host_plugin,
|
||||
const YaUnitInfo::GetUnitByBusResponse&);
|
||||
void log_response(bool is_host_vst,
|
||||
void log_response(bool is_host_plugin,
|
||||
const YaXmlRepresentationController::
|
||||
GetXmlRepresentationStreamResponse&);
|
||||
|
||||
void log_response(bool is_host_vst,
|
||||
void log_response(bool is_host_plugin,
|
||||
const YaAudioProcessor::GetBusArrangementResponse&);
|
||||
void log_response(bool is_host_vst,
|
||||
void log_response(bool is_host_plugin,
|
||||
const YaAudioProcessor::ProcessResponse&);
|
||||
void log_response(bool is_host_vst,
|
||||
void log_response(bool is_host_plugin,
|
||||
const YaComponent::GetControllerClassIdResponse&);
|
||||
void log_response(bool is_host_vst,
|
||||
void log_response(bool is_host_plugin,
|
||||
const YaComponent::GetBusInfoResponse&,
|
||||
bool from_cache = false);
|
||||
void log_response(bool is_host_vst,
|
||||
void log_response(bool is_host_plugin,
|
||||
const YaComponent::GetRoutingInfoResponse&);
|
||||
void log_response(bool is_host_vst, const YaComponent::SetActiveResponse&);
|
||||
void log_response(bool is_host_plugin,
|
||||
const YaComponent::SetActiveResponse&);
|
||||
void log_response(
|
||||
bool is_host_vst,
|
||||
bool is_host_plugin,
|
||||
const YaPrefetchableSupport::GetPrefetchableSupportResponse&);
|
||||
|
||||
void log_response(bool is_host_vst,
|
||||
void log_response(bool is_host_plugin,
|
||||
const YaComponentHandler3::CreateContextMenuResponse&);
|
||||
void log_response(bool is_host_vst,
|
||||
void log_response(bool is_host_plugin,
|
||||
const YaHostApplication::GetNameResponse&);
|
||||
void log_response(bool is_host_vst, const YaProgress::StartResponse&);
|
||||
void log_response(bool is_host_plugin, const YaProgress::StartResponse&);
|
||||
|
||||
template <typename T>
|
||||
void log_response(bool is_host_vst,
|
||||
void log_response(bool is_host_plugin,
|
||||
const PrimitiveWrapper<T>& value,
|
||||
bool from_cache = false) {
|
||||
// For logging all primitive return values other than `tresult`
|
||||
log_response_base(is_host_vst, [&](auto& message) {
|
||||
log_response_base(is_host_plugin, [&](auto& message) {
|
||||
message << value;
|
||||
if (from_cache) {
|
||||
message << " (from cache)";
|
||||
@@ -360,12 +377,12 @@ class Vst3Logger {
|
||||
* thus also be logged.
|
||||
*/
|
||||
template <std::invocable<std::ostringstream&> F>
|
||||
bool log_request_base(bool is_host_vst,
|
||||
bool log_request_base(bool is_host_plugin,
|
||||
Logger::Verbosity min_verbosity,
|
||||
F callback) {
|
||||
if (logger_.verbosity_ >= min_verbosity) [[unlikely]] {
|
||||
std::ostringstream message;
|
||||
if (is_host_vst) {
|
||||
if (is_host_plugin) {
|
||||
message << "[host -> vst] >> ";
|
||||
} else {
|
||||
message << "[vst -> host] >> ";
|
||||
@@ -381,8 +398,8 @@ class Vst3Logger {
|
||||
}
|
||||
|
||||
template <std::invocable<std::ostringstream&> F>
|
||||
bool log_request_base(bool is_host_vst, F callback) {
|
||||
return log_request_base(is_host_vst, Logger::Verbosity::most_events,
|
||||
bool log_request_base(bool is_host_plugin, F callback) {
|
||||
return log_request_base(is_host_plugin, Logger::Verbosity::most_events,
|
||||
callback);
|
||||
}
|
||||
|
||||
@@ -394,9 +411,9 @@ class Vst3Logger {
|
||||
* `true`.
|
||||
*/
|
||||
template <std::invocable<std::ostringstream&> F>
|
||||
void log_response_base(bool is_host_vst, F callback) {
|
||||
void log_response_base(bool is_host_plugin, F callback) {
|
||||
std::ostringstream message;
|
||||
if (is_host_vst) {
|
||||
if (is_host_plugin) {
|
||||
message << "[vst <- host] ";
|
||||
} else {
|
||||
message << "[host <- vst] ";
|
||||
|
||||
@@ -168,8 +168,7 @@ class MutualRecursionHelper {
|
||||
// pretend that we're not doing any async things here
|
||||
std::packaged_task<Result()> do_call(std::forward<F>(fn));
|
||||
std::future<Result> do_call_response = do_call.get_future();
|
||||
asio::dispatch(*mutual_recursion_contexts_.back(),
|
||||
std::move(do_call));
|
||||
asio::dispatch(*mutual_recursion_contexts_.back(), std::move(do_call));
|
||||
mutual_recursion_lock.unlock();
|
||||
|
||||
return do_call_response.get();
|
||||
@@ -186,7 +185,6 @@ class MutualRecursionHelper {
|
||||
* active one. If the stack is empty, then there's currently no mutual
|
||||
* recursion going on.
|
||||
*/
|
||||
std::vector<std::shared_ptr<asio::io_context>>
|
||||
mutual_recursion_contexts_;
|
||||
std::vector<std::shared_ptr<asio::io_context>> mutual_recursion_contexts_;
|
||||
std::mutex mutual_recursion_contexts_mutex_;
|
||||
};
|
||||
|
||||
@@ -236,11 +236,11 @@ class alignas(16) DynamicSpeakerArrangement {
|
||||
};
|
||||
|
||||
/**
|
||||
* Marker struct to indicate that the other side (the Wine VST host) should send
|
||||
* an updated copy of the plugin's `AEffect` object. Should not be needed since
|
||||
* the plugin should be calling `audioMasterIOChanged()` after it has changed
|
||||
* its object, but some improperly coded plugins will only initialize their
|
||||
* flags, IO properties and parameter counts after `effEditOpen()`.
|
||||
* Marker struct to indicate that the other side (the Wine plugin host) should
|
||||
* send an updated copy of the plugin's `AEffect` object. Should not be needed
|
||||
* since the plugin should be calling `audioMasterIOChanged()` after it has
|
||||
* changed its object, but some improperly coded plugins will only initialize
|
||||
* their flags, IO properties and parameter counts after `effEditOpen()`.
|
||||
*/
|
||||
struct WantsAEffectUpdate {
|
||||
using Response = AEffect;
|
||||
@@ -500,7 +500,7 @@ void serialize(S& s, Vst2Event::Payload& payload) {
|
||||
/**
|
||||
* The result of a `getParameter` or a `setParameter` call. For `setParameter`
|
||||
* this struct won't contain any values and mostly acts as an acknowledgement
|
||||
* from the Wine VST host.
|
||||
* from the Wine plugin host.
|
||||
*/
|
||||
struct ParameterResult {
|
||||
std::optional<float> value;
|
||||
|
||||
@@ -67,7 +67,7 @@ struct WantsConfiguration {
|
||||
};
|
||||
|
||||
/**
|
||||
* When we send a control message from the plugin to the Wine VST host, this
|
||||
* When we send a control message from the plugin to the Wine plugin host, this
|
||||
* encodes the information we request or the operation we want to perform. A
|
||||
* request of type `ControlRequest(T)` should send back a `T::Response`.
|
||||
*/
|
||||
@@ -238,9 +238,9 @@ struct AudioProcessorRequest {
|
||||
};
|
||||
|
||||
/**
|
||||
* When we do a callback from the Wine VST host to the plugin, this encodes the
|
||||
* information we want or the operation we want to perform. A request of type
|
||||
* `CallbackRequest(T)` should send back a `T::Response`.
|
||||
* When we do a callback from the Wine plugin host to the plugin, this encodes
|
||||
* the information we want or the operation we want to perform. A request of
|
||||
* type `CallbackRequest(T)` should send back a `T::Response`.
|
||||
*/
|
||||
using CallbackRequest =
|
||||
std::variant<Vst3ContextMenuProxy::Destruct,
|
||||
|
||||
@@ -78,10 +78,7 @@ static const char* stream_meta_data_string_keys[] = {
|
||||
|
||||
YaAttributeList::YaAttributeList() noexcept {FUNKNOWN_CTOR}
|
||||
|
||||
YaAttributeList::~YaAttributeList() noexcept {
|
||||
FUNKNOWN_DTOR
|
||||
}
|
||||
|
||||
YaAttributeList::~YaAttributeList() noexcept {FUNKNOWN_DTOR}
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wdelete-non-virtual-dtor"
|
||||
IMPLEMENT_FUNKNOWN_METHODS(YaAttributeList,
|
||||
@@ -89,7 +86,7 @@ IMPLEMENT_FUNKNOWN_METHODS(YaAttributeList,
|
||||
Steinberg::Vst::IAttributeList::iid)
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
std::vector<std::string> YaAttributeList::keys_and_types() const {
|
||||
std::vector<std::string> YaAttributeList::keys_and_types() const {
|
||||
std::vector<std::string> result{};
|
||||
for (const auto& [key, value] : attrs_int_) {
|
||||
result.push_back("\"" + key + "\" (int)");
|
||||
|
||||
@@ -80,17 +80,14 @@ YaBStream::YaBStream(Steinberg::IBStream* stream) {
|
||||
}
|
||||
}
|
||||
|
||||
YaBStream::~YaBStream() noexcept {
|
||||
FUNKNOWN_DTOR
|
||||
}
|
||||
|
||||
YaBStream::~YaBStream() noexcept {FUNKNOWN_DTOR}
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wdelete-non-virtual-dtor"
|
||||
IMPLEMENT_REFCOUNT(YaBStream)
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
tresult PLUGIN_API YaBStream::queryInterface(Steinberg::FIDString _iid,
|
||||
void** obj) {
|
||||
tresult PLUGIN_API YaBStream::queryInterface(Steinberg::FIDString _iid,
|
||||
void** obj) {
|
||||
QUERY_INTERFACE(_iid, obj, Steinberg::FUnknown::iid, Steinberg::IBStream)
|
||||
QUERY_INTERFACE(_iid, obj, Steinberg::IBStream::iid, Steinberg::IBStream)
|
||||
QUERY_INTERFACE(_iid, obj, Steinberg::ISizeableStream::iid,
|
||||
|
||||
@@ -43,17 +43,15 @@ Vst3ComponentHandlerProxy::Vst3ComponentHandlerProxy(
|
||||
arguments_(std::move(args)){FUNKNOWN_CTOR}
|
||||
|
||||
Vst3ComponentHandlerProxy::~Vst3ComponentHandlerProxy() noexcept {
|
||||
FUNKNOWN_DTOR
|
||||
}
|
||||
|
||||
FUNKNOWN_DTOR}
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wdelete-non-virtual-dtor"
|
||||
IMPLEMENT_REFCOUNT(Vst3ComponentHandlerProxy)
|
||||
IMPLEMENT_REFCOUNT(Vst3ComponentHandlerProxy)
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
tresult PLUGIN_API
|
||||
Vst3ComponentHandlerProxy::queryInterface(Steinberg::FIDString _iid,
|
||||
void** obj) {
|
||||
tresult PLUGIN_API Vst3ComponentHandlerProxy::queryInterface(
|
||||
Steinberg::FIDString _iid,
|
||||
void** obj) {
|
||||
if (YaComponentHandler::supported()) {
|
||||
QUERY_INTERFACE(_iid, obj, Steinberg::FUnknown::iid,
|
||||
Steinberg::Vst::IComponentHandler)
|
||||
|
||||
@@ -22,17 +22,15 @@ Vst3ConnectionPointProxy::Vst3ConnectionPointProxy(
|
||||
arguments_(std::move(args)){FUNKNOWN_CTOR}
|
||||
|
||||
Vst3ConnectionPointProxy::~Vst3ConnectionPointProxy() noexcept {
|
||||
FUNKNOWN_DTOR
|
||||
}
|
||||
|
||||
FUNKNOWN_DTOR}
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wdelete-non-virtual-dtor"
|
||||
IMPLEMENT_REFCOUNT(Vst3ConnectionPointProxy)
|
||||
IMPLEMENT_REFCOUNT(Vst3ConnectionPointProxy)
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
tresult PLUGIN_API
|
||||
Vst3ConnectionPointProxy::queryInterface(Steinberg::FIDString _iid,
|
||||
void** obj) {
|
||||
tresult PLUGIN_API Vst3ConnectionPointProxy::queryInterface(
|
||||
Steinberg::FIDString _iid,
|
||||
void** obj) {
|
||||
if (YaConnectionPoint::supported()) {
|
||||
QUERY_INTERFACE(_iid, obj, Steinberg::FUnknown::iid,
|
||||
Steinberg::Vst::IConnectionPoint)
|
||||
|
||||
@@ -30,17 +30,15 @@ Vst3ContextMenuProxy::Vst3ContextMenuProxy(ConstructArgs&& args) noexcept
|
||||
: YaContextMenu(std::move(args.context_menu_args)),
|
||||
arguments_(std::move(args)){FUNKNOWN_CTOR}
|
||||
|
||||
Vst3ContextMenuProxy::~Vst3ContextMenuProxy() noexcept {
|
||||
FUNKNOWN_DTOR
|
||||
}
|
||||
|
||||
Vst3ContextMenuProxy::~Vst3ContextMenuProxy() noexcept {FUNKNOWN_DTOR}
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wdelete-non-virtual-dtor"
|
||||
IMPLEMENT_REFCOUNT(Vst3ContextMenuProxy)
|
||||
IMPLEMENT_REFCOUNT(Vst3ContextMenuProxy)
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
tresult PLUGIN_API
|
||||
Vst3ContextMenuProxy::queryInterface(Steinberg::FIDString _iid, void** obj) {
|
||||
tresult PLUGIN_API Vst3ContextMenuProxy::queryInterface(
|
||||
Steinberg::FIDString _iid,
|
||||
void** obj) {
|
||||
if (YaContextMenu::supported()) {
|
||||
QUERY_INTERFACE(_iid, obj, Steinberg::FUnknown::iid,
|
||||
Steinberg::Vst::IContextMenu)
|
||||
|
||||
@@ -19,13 +19,11 @@
|
||||
YaContextMenuTarget::YaContextMenuTarget(ConstructArgs&& args) noexcept
|
||||
: arguments_(std::move(args)){FUNKNOWN_CTOR}
|
||||
|
||||
YaContextMenuTarget::~YaContextMenuTarget() noexcept {
|
||||
FUNKNOWN_DTOR
|
||||
}
|
||||
YaContextMenuTarget::~YaContextMenuTarget() noexcept {FUNKNOWN_DTOR}
|
||||
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wdelete-non-virtual-dtor"
|
||||
IMPLEMENT_FUNKNOWN_METHODS(YaContextMenuTarget,
|
||||
Steinberg::Vst::IContextMenuTarget,
|
||||
Steinberg::Vst::IContextMenuTarget::iid)
|
||||
IMPLEMENT_FUNKNOWN_METHODS(YaContextMenuTarget,
|
||||
Steinberg::Vst::IContextMenuTarget,
|
||||
Steinberg::Vst::IContextMenuTarget::iid)
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
@@ -30,17 +30,15 @@ Vst3HostContextProxy::Vst3HostContextProxy(ConstructArgs&& args) noexcept
|
||||
YaPlugInterfaceSupport(std::move(args.plug_interface_support_args)),
|
||||
arguments_(std::move(args)){FUNKNOWN_CTOR}
|
||||
|
||||
Vst3HostContextProxy::~Vst3HostContextProxy() noexcept {
|
||||
FUNKNOWN_DTOR
|
||||
}
|
||||
|
||||
Vst3HostContextProxy::~Vst3HostContextProxy() noexcept {FUNKNOWN_DTOR}
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wdelete-non-virtual-dtor"
|
||||
IMPLEMENT_REFCOUNT(Vst3HostContextProxy)
|
||||
IMPLEMENT_REFCOUNT(Vst3HostContextProxy)
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
tresult PLUGIN_API
|
||||
Vst3HostContextProxy::queryInterface(Steinberg::FIDString _iid, void** obj) {
|
||||
tresult PLUGIN_API Vst3HostContextProxy::queryInterface(
|
||||
Steinberg::FIDString _iid,
|
||||
void** obj) {
|
||||
if (YaHostApplication::supported()) {
|
||||
QUERY_INTERFACE(_iid, obj, Steinberg::FUnknown::iid,
|
||||
Steinberg::Vst::IHostApplication)
|
||||
|
||||
@@ -25,18 +25,16 @@ YaMessagePtr::YaMessagePtr(IMessage& message)
|
||||
original_message_ptr_(static_cast<native_size_t>(
|
||||
reinterpret_cast<size_t>(&message))){FUNKNOWN_CTOR}
|
||||
|
||||
YaMessagePtr::~YaMessagePtr() noexcept {
|
||||
FUNKNOWN_DTOR
|
||||
}
|
||||
|
||||
YaMessagePtr::~YaMessagePtr() noexcept {FUNKNOWN_DTOR}
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wdelete-non-virtual-dtor"
|
||||
IMPLEMENT_FUNKNOWN_METHODS(YaMessagePtr,
|
||||
Steinberg::Vst::IMessage,
|
||||
Steinberg::Vst::IMessage::iid)
|
||||
IMPLEMENT_FUNKNOWN_METHODS(YaMessagePtr,
|
||||
Steinberg::Vst::IMessage,
|
||||
Steinberg::Vst::IMessage::iid)
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
Steinberg::Vst::IMessage* YaMessagePtr::get_original() const noexcept {
|
||||
Steinberg::Vst::IMessage
|
||||
* YaMessagePtr::get_original() const noexcept {
|
||||
// See the docstrings on `YaMessage` and `YaMessagePtr`
|
||||
return reinterpret_cast<IMessage*>(
|
||||
static_cast<size_t>(original_message_ptr_));
|
||||
@@ -64,10 +62,7 @@ Steinberg::Vst::IAttributeList* PLUGIN_API YaMessagePtr::getAttributes() {
|
||||
|
||||
YaMessage::YaMessage() noexcept {FUNKNOWN_CTOR}
|
||||
|
||||
YaMessage::~YaMessage() noexcept {
|
||||
FUNKNOWN_DTOR
|
||||
}
|
||||
|
||||
YaMessage::~YaMessage() noexcept {FUNKNOWN_DTOR}
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wdelete-non-virtual-dtor"
|
||||
IMPLEMENT_FUNKNOWN_METHODS(YaMessage,
|
||||
@@ -75,7 +70,7 @@ IMPLEMENT_FUNKNOWN_METHODS(YaMessage,
|
||||
Steinberg::Vst::IMessage::iid)
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
Steinberg::FIDString PLUGIN_API YaMessage::getMessageID() {
|
||||
Steinberg::FIDString PLUGIN_API YaMessage::getMessageID() {
|
||||
if (message_id_) {
|
||||
return message_id_->c_str();
|
||||
} else {
|
||||
|
||||
@@ -27,17 +27,15 @@ Vst3PlugFrameProxy::Vst3PlugFrameProxy(ConstructArgs&& args) noexcept
|
||||
: YaPlugFrame(std::move(args.plug_frame_args)),
|
||||
arguments_(std::move(args)){FUNKNOWN_CTOR}
|
||||
|
||||
Vst3PlugFrameProxy::~Vst3PlugFrameProxy() noexcept {
|
||||
FUNKNOWN_DTOR
|
||||
}
|
||||
|
||||
Vst3PlugFrameProxy::~Vst3PlugFrameProxy() noexcept {FUNKNOWN_DTOR}
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wdelete-non-virtual-dtor"
|
||||
IMPLEMENT_REFCOUNT(Vst3PlugFrameProxy)
|
||||
IMPLEMENT_REFCOUNT(Vst3PlugFrameProxy)
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
tresult PLUGIN_API Vst3PlugFrameProxy::queryInterface(Steinberg::FIDString _iid,
|
||||
void** obj) {
|
||||
tresult PLUGIN_API Vst3PlugFrameProxy::queryInterface(
|
||||
Steinberg::FIDString _iid,
|
||||
void** obj) {
|
||||
if (YaPlugFrame::supported()) {
|
||||
QUERY_INTERFACE(_iid, obj, Steinberg::FUnknown::iid,
|
||||
Steinberg::IPlugFrame)
|
||||
|
||||
@@ -33,17 +33,15 @@ Vst3PlugViewProxy::Vst3PlugViewProxy(ConstructArgs&& args) noexcept
|
||||
std::move(args.plug_view_content_scale_support_args)),
|
||||
arguments_(std::move(args)){FUNKNOWN_CTOR}
|
||||
|
||||
Vst3PlugViewProxy::~Vst3PlugViewProxy() noexcept {
|
||||
FUNKNOWN_DTOR
|
||||
}
|
||||
|
||||
Vst3PlugViewProxy::~Vst3PlugViewProxy() noexcept {FUNKNOWN_DTOR}
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wdelete-non-virtual-dtor"
|
||||
IMPLEMENT_REFCOUNT(Vst3PlugViewProxy)
|
||||
IMPLEMENT_REFCOUNT(Vst3PlugViewProxy)
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
tresult PLUGIN_API Vst3PlugViewProxy::queryInterface(Steinberg::FIDString _iid,
|
||||
void** obj) {
|
||||
tresult PLUGIN_API Vst3PlugViewProxy::queryInterface(
|
||||
Steinberg::FIDString _iid,
|
||||
void** obj) {
|
||||
if (YaPlugView::supported()) {
|
||||
QUERY_INTERFACE(_iid, obj, Steinberg::FUnknown::iid,
|
||||
Steinberg::IPlugView)
|
||||
|
||||
@@ -27,17 +27,15 @@ Vst3PluginFactoryProxy::Vst3PluginFactoryProxy(ConstructArgs&& args) noexcept
|
||||
arguments_(std::move(args)){FUNKNOWN_CTOR}
|
||||
|
||||
// clang-format just doesn't understand these macros, I guess
|
||||
Vst3PluginFactoryProxy::~Vst3PluginFactoryProxy() noexcept {
|
||||
FUNKNOWN_DTOR
|
||||
}
|
||||
|
||||
Vst3PluginFactoryProxy::~Vst3PluginFactoryProxy() noexcept {FUNKNOWN_DTOR}
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wdelete-non-virtual-dtor"
|
||||
IMPLEMENT_REFCOUNT(Vst3PluginFactoryProxy)
|
||||
IMPLEMENT_REFCOUNT(Vst3PluginFactoryProxy)
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
tresult PLUGIN_API
|
||||
Vst3PluginFactoryProxy::queryInterface(Steinberg::FIDString _iid, void** obj) {
|
||||
tresult PLUGIN_API Vst3PluginFactoryProxy::queryInterface(
|
||||
Steinberg::FIDString _iid,
|
||||
void** obj) {
|
||||
if (YaPluginFactory3::supports_plugin_factory()) {
|
||||
QUERY_INTERFACE(_iid, obj, Steinberg::FUnknown::iid,
|
||||
Steinberg::IPluginFactory)
|
||||
|
||||
@@ -77,17 +77,15 @@ Vst3PluginProxy::Vst3PluginProxy(ConstructArgs&& args) noexcept
|
||||
std::move(args.xml_representation_controller_args)),
|
||||
arguments_(std::move(args)){FUNKNOWN_CTOR}
|
||||
|
||||
Vst3PluginProxy::~Vst3PluginProxy() noexcept {
|
||||
FUNKNOWN_DTOR
|
||||
}
|
||||
|
||||
Vst3PluginProxy::~Vst3PluginProxy() noexcept {FUNKNOWN_DTOR}
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wdelete-non-virtual-dtor"
|
||||
IMPLEMENT_REFCOUNT(Vst3PluginProxy)
|
||||
IMPLEMENT_REFCOUNT(Vst3PluginProxy)
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
tresult PLUGIN_API Vst3PluginProxy::queryInterface(Steinberg::FIDString _iid,
|
||||
void** obj) {
|
||||
tresult PLUGIN_API Vst3PluginProxy::queryInterface(
|
||||
Steinberg::FIDString _iid,
|
||||
void** obj) {
|
||||
if (YaPluginBase::supported()) {
|
||||
// We had to expand the macro here because we need to cast through
|
||||
// `YaPluginBase`, since `IpluginBase` is also a base of `IComponent`
|
||||
|
||||
Reference in New Issue
Block a user