Change terminology from 'VST' to 'plugin'

This commit is contained in:
Robbert van der Helm
2022-08-23 18:34:03 +02:00
parent bf7280fc7e
commit 4ca7ea17b2
35 changed files with 703 additions and 706 deletions
+12 -12
View File
@@ -77,7 +77,7 @@ Vst2PluginBridge::Vst2PluginBridge(const ghc::filesystem::path& plugin_path,
set_realtime_priority(true);
pthread_setname_np(pthread_self(), "host-callbacks");
sockets_.vst_host_callback_.receive_events(
sockets_.plugin_host_callback_.receive_events(
std::pair<Vst2Logger&, bool>(logger_, false),
[&](Vst2Event& event, bool /*on_main_thread*/) {
switch (event.opcode) {
@@ -178,7 +178,7 @@ Vst2PluginBridge::Vst2PluginBridge(const ghc::filesystem::path& plugin_path,
// over the `dispatcher()` socket. This would happen whenever the plugin
// calls `audioMasterIOChanged()` and after the host calls `effOpen()`.
const auto initialization_data =
sockets_.host_vst_control_.receive_single<Vst2EventResult>();
sockets_.host_plugin_control_.receive_single<Vst2EventResult>();
const auto initialized_plugin =
std::get<AEffect>(initialization_data.payload);
@@ -188,7 +188,7 @@ Vst2PluginBridge::Vst2PluginBridge(const ghc::filesystem::path& plugin_path,
// After receiving the `AEffect` values we'll want to send the configuration
// back to complete the startup process
sockets_.host_vst_control_.send(config_);
sockets_.host_plugin_control_.send(config_);
update_aeffect(plugin_, initialized_plugin);
}
@@ -250,7 +250,7 @@ class DispatchDataConverter : public DefaultDataConverter {
break;
case effEditOpen:
// The host will have passed us an X11 window handle in the void
// pointer. In the Wine VST host we'll create a Win32 window,
// pointer. In the Wine plugin host we'll create a Win32 window,
// ask the plugin to embed itself in that and then embed that
// window into this X11 window handle.
return reinterpret_cast<size_t>(data);
@@ -541,7 +541,7 @@ intptr_t Vst2PluginBridge::dispatch(AEffect* /*plugin*/,
intptr_t return_value = 0;
try {
// TODO: Add some kind of timeout?
return_value = sockets_.host_vst_dispatch_.send_event(
return_value = sockets_.host_plugin_dispatch_.send_event(
converter, std::pair<Vst2Logger&, bool>(logger_, true),
opcode, index, value, data, option);
} catch (const std::system_error&) {
@@ -617,7 +617,7 @@ intptr_t Vst2PluginBridge::dispatch(AEffect* /*plugin*/,
// and loading plugin state it's much better to have bitsery or our
// receiving function temporarily allocate a large enough buffer rather than
// to have a bunch of allocated memory sitting around doing nothing.
return sockets_.host_vst_dispatch_.send_event(
return sockets_.host_plugin_dispatch_.send_event(
converter, std::pair<Vst2Logger&, bool>(logger_, true), opcode, index,
value, data, option);
}
@@ -692,12 +692,12 @@ void Vst2PluginBridge::do_process(T** inputs, T** outputs, int sample_frames) {
// After writing audio to the shared memory buffers, we'll send the
// processing request parameters to the Wine plugin host so it can start
// processing audio. This is why we don't need any explicit synchronisation.
sockets_.host_vst_process_replacing_.send(request);
sockets_.host_plugin_process_replacing_.send(request);
// From the Wine side we'll send a zero byte struct back as an
// acknowledgement that audio processing has finished. At this point the
// audio will have been written to our buffers.
sockets_.host_vst_process_replacing_.receive_single<Ack>();
sockets_.host_plugin_process_replacing_.receive_single<Ack>();
for (int channel = 0; channel < plugin_.numOutputs; channel++) {
const T* output_channel =
@@ -777,10 +777,10 @@ float Vst2PluginBridge::get_parameter(AEffect* /*plugin*/, int index) {
// called at the same time since they share the same socket
{
std::lock_guard lock(parameters_mutex_);
sockets_.host_vst_parameters_.send(request);
sockets_.host_plugin_parameters_.send(request);
response =
sockets_.host_vst_parameters_.receive_single<ParameterResult>();
sockets_.host_plugin_parameters_.receive_single<ParameterResult>();
}
logger_.log_get_parameter_response(*response.value);
@@ -798,10 +798,10 @@ void Vst2PluginBridge::set_parameter(AEffect* /*plugin*/,
{
std::lock_guard lock(parameters_mutex_);
sockets_.host_vst_parameters_.send(request);
sockets_.host_plugin_parameters_.send(request);
response =
sockets_.host_vst_parameters_.receive_single<ParameterResult>();
sockets_.host_plugin_parameters_.receive_single<ParameterResult>();
}
logger_.log_set_parameter_response();
+2 -2
View File
@@ -27,8 +27,8 @@
/**
* This handles the communication between the Linux native VST2 plugin and the
* Wine VST host. The functions below should be used as callback functions in an
* `AEffect` object.
* Wine plugin host. The functions below should be used as callback functions in
* an `AEffect` object.
*
* The naming scheme of all of these 'bridge' classes is `<type>{,Plugin}Bridge`
* for greppability reasons. The `Plugin` infix is added on the native plugin
+3 -3
View File
@@ -46,13 +46,13 @@ Vst3PluginBridge::Vst3PluginBridge(const ghc::filesystem::path& plugin_path)
// Now that communication is set up the Wine host can send callbacks to this
// bridge class, and we can send control messages to the Wine host. This
// messaging mechanism is how we relay the VST3 communication protocol. As a
// first thing, the Wine VST host will ask us for a copy of the
// first thing, the Wine plugin host will ask us for a copy of the
// configuration.
host_callback_handler_ = std::jthread([&]() {
set_realtime_priority(true);
pthread_setname_np(pthread_self(), "host-callbacks");
sockets_.vst_host_callback_.receive_messages(
sockets_.plugin_host_callback_.receive_messages(
std::pair<Vst3Logger&, bool>(logger_, false),
overload{
[&](const Vst3ContextMenuProxy::Destruct& request)
@@ -435,7 +435,7 @@ Steinberg::IPluginFactory* Vst3PluginBridge::get_plugin_factory() {
// have started before this since the Wine plugin host will request a
// copy of the configuration during its initialization.
Vst3PluginFactoryProxy::ConstructArgs factory_args =
sockets_.host_vst_control_.send_message(
sockets_.host_plugin_control_.send_message(
Vst3PluginFactoryProxy::Construct{},
std::pair<Vst3Logger&, bool>(logger_, true));
plugin_factory_ = Steinberg::owned(
+4 -4
View File
@@ -117,15 +117,15 @@ class Vst3PluginBridge : PluginBridge<Vst3Sockets<std::jthread>> {
/**
* Send a control message to the Wine plugin host and return the response.
* This is a shorthand for `sockets_.host_vst_control_.send_message()` for
* use in VST3 interface implementations. This is mostly used for main
* This is a shorthand for `sockets_.host_plugin_control_.send_message()`
* for use in VST3 interface implementations. This is mostly used for main
* thread messages but outside of the situations where plugins will crash or
* misbehave thread guarantees are not always upheld in yabridge's VST3
* implementation.
*/
template <typename T>
typename T::Response send_message(const T& object) {
return sockets_.host_vst_control_.send_message(
return sockets_.host_plugin_control_.send_message(
object, std::pair<Vst3Logger&, bool>(logger_, true));
}
@@ -199,7 +199,7 @@ class Vst3PluginBridge : PluginBridge<Vst3Sockets<std::jthread>> {
private:
/**
* Handles callbacks from the plugin to the host over the
* `vst_host_callback_` sockets.
* `plugin_host_callback_` sockets.
*/
std::jthread host_callback_handler_;