Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix backwards compatibility with 64ch REAPER versions #267

Merged
merged 7 commits into from
Feb 29, 2024

Conversation

firthm01
Copy link
Contributor

Setting BusesProperties in a AudioProcessor ctor sets the default layout for the plugin.
If this is 128 channels, REAPER v6.x will still instantiate the plugin and appear happy with it, but never call the processBlock method, so level monitoring, export and DSP will not run.
Therefore, it is necessary to know if we are running under REAPER with a 64 channel limitation within the plugins. The extension already provided an exposed function to do this, which could be called via the DetermineChannelCount helper. A handle to the host is grabbed via setIHostApplication - however, this is only called AFTER the plugin has been constructed, when we would need to set the default layout.
A bus can be resized at any time using the JUCE setChannelLayoutOfBus function. However, this always seems to return false if there is more than one bus in the layout (not sure if a bug in JUCE/VST3/REAPER, but it is a blocker in any case). For this reason, plugin layouts had to be changed to a single bus of discreteChannels so they can be resized after construction.
Additionally, there are some peculiarities with calls from the host to isBusesLayoutSupported - dozens of configurations are queried with quite unusual layout types. The actual set layout isn't always queried, so the calls would always return false. To simplify this, so long as the input and output channel counts match, we return true. Ultimately we're not bothered what the buses actually are as everything we do works entirely on a per-channel basis.

@firthm01 firthm01 marked this pull request as ready for review January 26, 2024 14:48
@firthm01 firthm01 marked this pull request as draft January 27, 2024 02:06
@firthm01
Copy link
Contributor Author

Fix needs applying to ADM Export Source VST

@firthm01 firthm01 marked this pull request as ready for review January 28, 2024 22:43
@firthm01 firthm01 self-assigned this Jan 29, 2024
@firthm01 firthm01 merged commit 057bf54 into main Feb 29, 2024
5 checks passed
@firthm01 firthm01 deleted the fix-64ch-bw-compat branch February 29, 2024 19:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant