mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-06-15 07:53:55 +02:00
Also clear bus cache on IAudioProcessor::setActive
Now we need a workaround for our REAPER workaround because REAPER doesn't follow the audio processing workflow diagram, amazing!
This commit is contained in:
@@ -310,6 +310,22 @@ Vst3PluginProxyImpl::activateBus(Steinberg::Vst::MediaType type,
|
|||||||
}
|
}
|
||||||
|
|
||||||
tresult PLUGIN_API Vst3PluginProxyImpl::setActive(TBool state) {
|
tresult PLUGIN_API Vst3PluginProxyImpl::setActive(TBool state) {
|
||||||
|
// HACK: Even though we have implemented this cache specifically for REAPER,
|
||||||
|
// REAPER mixes up `IComponent::setActive` and
|
||||||
|
// `IAudioProcessor::setProcessing`. `IAudioProcessor::setProcessing`
|
||||||
|
// is called before setting up bus arrangements, so without this the
|
||||||
|
// cache would be filled with default data rather than the bus
|
||||||
|
// arrangement chosen by REAPER. So now our workaround to get
|
||||||
|
// acceptable performance in REAPER needs a workaround of its ownn.
|
||||||
|
// Great!
|
||||||
|
// TODO: We probably also need a reset on
|
||||||
|
// `IComponentHandler::restartComponent()`
|
||||||
|
if (state) {
|
||||||
|
processing_bus_cache.emplace();
|
||||||
|
} else {
|
||||||
|
processing_bus_cache.reset();
|
||||||
|
}
|
||||||
|
|
||||||
return bridge.send_audio_processor_message(
|
return bridge.send_audio_processor_message(
|
||||||
YaComponent::SetActive{.instance_id = instance_id(), .state = state});
|
YaComponent::SetActive{.instance_id = instance_id(), .state = state});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user