mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-07 03:50:11 +02:00
Handle setting channel infos as mutually recursive
This was causing a timing issue with DMG plugins where the plugins would try to resize after receiving new state (and not during the call), while REAPER at the same time would try to set channel context information on the plugin (which also has to be handled on the GUI thread).
This commit is contained in:
@@ -27,6 +27,8 @@ Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
### Fixed
|
||||
|
||||
- Prevent _DMG_ VST3 plugins from freezing in **REAPER** under certain
|
||||
circumstances.
|
||||
- Fixed builds on Wine 6.8 because of internal changes to Wine's `windows.h`
|
||||
implementation.
|
||||
|
||||
|
||||
@@ -836,9 +836,17 @@ Vst3PluginProxyImpl::endEditFromHost(Steinberg::Vst::ParamID paramID) {
|
||||
tresult PLUGIN_API Vst3PluginProxyImpl::setChannelContextInfos(
|
||||
Steinberg::Vst::IAttributeList* list) {
|
||||
if (list) {
|
||||
return bridge.send_message(YaInfoListener::SetChannelContextInfos{
|
||||
.instance_id = instance_id(),
|
||||
.list = YaAttributeList::read_channel_context(list)});
|
||||
// NOTE: After getting and setting state, the plugin may want to resize
|
||||
// to match its old size. The DMG plugins tend to delay this
|
||||
// request until after the state has been set, but at that point
|
||||
// in time REAPER will also send channel context info. Both of
|
||||
// these things need to be handled on the GUI thread on their
|
||||
// receiving sides, resulting in a deadlock without this mutual
|
||||
// recursion.
|
||||
return maybe_send_mutually_recursive_message(
|
||||
YaInfoListener::SetChannelContextInfos{
|
||||
.instance_id = instance_id(),
|
||||
.list = YaAttributeList::read_channel_context(list)});
|
||||
} else {
|
||||
bridge.logger.log(
|
||||
"WARNING: Null pointer passed to "
|
||||
|
||||
Reference in New Issue
Block a user