Add a workaround for a bug in Ardour 5.X

Ardour will send events to the plugin before it has even finished
initializing. This has been fixed back in 2018 but Ardour has not seen a
stable release since then.

https://tracker.ardour.org/view.php?id=7668
This commit is contained in:
Robbert van der Helm
2020-05-01 17:53:06 +02:00
parent ed8e3ba114
commit 4d7724c5b6
2 changed files with 20 additions and 5 deletions
+4 -5
View File
@@ -10,18 +10,17 @@ also staying easy to debug and maintain.
There are a few things that should be done before releasing this, including:
- Do some final refactoring/clean up. There are a few small todos left for
things that could be a made little bit prettier.
- Add missing details if any to the architecture section.
- Rewrite parts of this readme.
- Briefly verify that this also works fine in Reaper and Ardour.
## Tested with
yabridge has been primarily tested under and verified to work correctly with:
Yabridge has been verified to work correctly with:
- Bitwig Studio 3.1 and the beta releases of 3.2
- Carla 2.1
- Ardour 5.12
- Wine Staging 5.5 and 5.6 (the wine-staging-5.7-1 package currently in Arch and
Manjaro's repositories is broken because of a regression in application
startup behavior)
@@ -70,8 +69,8 @@ find "$HOME/.wine/drive_c/Program Files/Steinberg/VstPlugins" -type f -iname '*.
### Copying
It is also possible to use yabridge by creating copies of `libyabridge.so`
instead of making symlinks. This is not recommended as it makes updating a
hassle, but it may be required if your host has issues using symlinks. If you
instead of making symlinks. This is not recommended as it makes updating more
difficult, but it may be required if your host has issues using symlinks. If you
choose to do this, then you'll have to make sure `yabridge-host.exe` and
`yabridge-host.exe.so` are somewhere in your search path as otherwise yabridge
won't be able to find them. Either copy them to `/usr/local/bin` (not
+16
View File
@@ -330,6 +330,22 @@ intptr_t HostBridge::dispatch(AEffect* /*plugin*/,
intptr_t value,
void* data,
float option) {
// HACK: Ardour 5.X has a bug in its VST implementation where it calls the
// plugin's dispatcher before the plugin has even finished
// initializing. This has been fixed back in 2018, but there has not
// been a release that contains the fix yet. This should be removed
// once Ardour 6.0 gets released.
// https://tracker.ardour.org/view.php?id=7668
if (BOOST_UNLIKELY(plugin.magic == 0)) {
logger.log_event(true, opcode, index, value, nullptr, option);
logger.log(
" WARNING: The host has dispatched an event before the plugin "
"has finished initializing, ignoring the event. (are we running "
"Ardour 5.X?)");
logger.log_event_response(true, opcode, 0, nullptr);
return 0;
}
DispatchDataConverter converter(chunk_data, editor_rectangle);
switch (opcode) {