Conversation
Add ProcessContext::host_render_mode(), defaulting to None. The CLAP wrapper returns the mode last set through clap_plugin_render::set(). nih-plug already stores that value, but only hands it to the plugin via BufferConfig on the next initialize(). CLAP hosts - and clap-wrapper's AAX wrapper when Pro Tools enters an offline bounce - may switch the render mode without re-activating, so a plugin whose real-time path polls a worker thread without blocking had no way to know it should block for the length of a faster-than-real-time bounce. The default implementation keeps every other wrapper and every existing ProcessContext implementor source-compatible.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
ProcessContext::host_render_mode() -> Option<ProcessMode>, defaulting toNone. The CLAP wrapper overrides it to return the value last set throughclap_plugin_render::set().Why: the wrapper already stores that value, but only passes it to the plug-in through
BufferConfigon the nextinitialize(). CLAP hosts can switch the render mode without re-activating. So can clap-wrapper's AAX wrapper once it forwards Pro Tools'EnteringOfflineMode(de-artifact AUD-1692). Without this method, a plug-in that polls a worker thread without blocking cannot tell that it should block for the length of a faster-than-real-time bounce.AtomicCellload, the same oneactivatealready does.Test plan
cargo checkcargo test --lib: 103 passedpinned/de-artifact-aud1692)