mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-06-09 22:02:10 +02:00
Add dedicated IAudioProcessor/IComponent sockets
This way every relevant object instance will get its own thread for handling these calls. The alternative would be creating a full fat Vst3MessageHandler pair for all object instances, but that would be a huge waste.
This commit is contained in:
@@ -64,21 +64,6 @@ using ControlRequest = std::variant<Vst3PlugViewProxy::Destruct,
|
||||
Vst3PluginProxy::Destruct,
|
||||
Vst3PluginProxy::SetState,
|
||||
Vst3PluginProxy::GetState,
|
||||
YaAudioProcessor::SetBusArrangements,
|
||||
YaAudioProcessor::GetBusArrangement,
|
||||
YaAudioProcessor::CanProcessSampleSize,
|
||||
YaAudioProcessor::GetLatencySamples,
|
||||
YaAudioProcessor::SetupProcessing,
|
||||
YaAudioProcessor::SetProcessing,
|
||||
YaAudioProcessor::Process,
|
||||
YaAudioProcessor::GetTailSamples,
|
||||
YaComponent::GetControllerClassId,
|
||||
YaComponent::SetIoMode,
|
||||
YaComponent::GetBusCount,
|
||||
YaComponent::GetBusInfo,
|
||||
YaComponent::GetRoutingInfo,
|
||||
YaComponent::ActivateBus,
|
||||
YaComponent::SetActive,
|
||||
YaConnectionPoint::Connect,
|
||||
YaConnectionPoint::Disconnect,
|
||||
YaEditController::SetComponentState,
|
||||
@@ -107,6 +92,35 @@ void serialize(S& s, ControlRequest& payload) {
|
||||
s.ext(payload, bitsery::ext::StdVariant{});
|
||||
}
|
||||
|
||||
/**
|
||||
* A subset of all functions a host can call on a plugin. These functions are
|
||||
* called from a hot loop every processing cycle, so we want a dedicated socket
|
||||
* for these for every plugin instance.
|
||||
*/
|
||||
using AudioProcessorRequest =
|
||||
std::variant<YaAudioProcessor::SetBusArrangements,
|
||||
YaAudioProcessor::GetBusArrangement,
|
||||
YaAudioProcessor::CanProcessSampleSize,
|
||||
YaAudioProcessor::GetLatencySamples,
|
||||
YaAudioProcessor::SetupProcessing,
|
||||
YaAudioProcessor::SetProcessing,
|
||||
YaAudioProcessor::Process,
|
||||
YaAudioProcessor::GetTailSamples,
|
||||
YaComponent::GetControllerClassId,
|
||||
YaComponent::SetIoMode,
|
||||
YaComponent::GetBusCount,
|
||||
YaComponent::GetBusInfo,
|
||||
YaComponent::GetRoutingInfo,
|
||||
YaComponent::ActivateBus,
|
||||
YaComponent::SetActive>;
|
||||
|
||||
template <typename S>
|
||||
void serialize(S& s, AudioProcessorRequest& payload) {
|
||||
// All of the objects in `AudioProcessorRequest` should have their own
|
||||
// serialization function.
|
||||
s.ext(payload, bitsery::ext::StdVariant{});
|
||||
}
|
||||
|
||||
/**
|
||||
* 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
|
||||
|
||||
Reference in New Issue
Block a user