Fix bypass for hosts providing in-place buffers #122
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.
LV2 hosts can use the same buffer for input and output. As a popular example, Ardour chooses to do so, making the soft-bypass option a no-op, the plugin is thus "always on". To fix this, I introduced side buffers (1s long each) where we keep a copy for
signal_crossfade_run()
in caseinput_{1,2} == output_{1,2}
.1s long side buffers should be plenty for all usage during editing, yet I have no idea if they are long enough for example in free-wheeling during export. Just in case, I am discarding input longer than 1s to not overflow the buffers.
I read that you are not maintaining noise-repellent right now, but in case this changes, I wanted to make sure that you have the fix available. Thanks for this great plugin! 😃
Fixes #113