-
Notifications
You must be signed in to change notification settings - Fork 0
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
Plugin audio ports #3
Merged
Merged
Conversation
This file contains 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
Refactors how the pin connector and audio buffers are incorporated into AudioPlugin, how buffer updates occur, and how buffer customization works. Also uses more class type NTTP to simplify more of the template parameters.
Reasons: - It's clunky to use - It bloats the PR - Without a strong typedef it does nothing that can't be accomplished with a comment
Merged
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, only 5 editorials/questions.
As usual with such PRs, I didn't check every single template parameter, but rather tried to understand the common sense.
10 tasks
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.
Fixes some of the jank left over from the big refactor.
Changes
PluginAudioPort
- New interface class that joins a pin connector together with a buffer interface.bufferPropertiesChanged
to directly update the buffer in the derived class. This coupling of two closely related components eliminates the need for janky signal/slot connections.DefaultPluginAudioPort
is the default implementation and it usesDefaultAudioPluginBuffer
.CustomPluginAudioPort
.RemotePluginAudioPort
is a custom plugin audio port implementation for plugins that useRemotePlugin
(VSTs and Zyn). It has an "inactive" state where the buffer is unavailable (such as when Vestige has no VST loaded).ConfigurableAudioPort
is a custom plugin audio port implementation that builds on top ofRemotePluginAudioPort
to offer the choice between a remote buffer or a local buffer at runtime. This is used by ZynAddSubFX which uses a remote buffer when the GUI is open and a local buffer when it is closed. In the future,ConfigurableAudioPort
should also be helpful in adding sandboxing support for plugins to run either in a separate process or directly in the LMMS process.AudioDataKind
- All supported sample types are encoded into this enum. Allows all plugin config information to be stored inAudioPluginConfig
- no moreSampleT
type parameter that must accompany it.AudioPluginConfig
I was able to greatly simplify a lot of the template parameters throughout the pin connector PRIdChangeInputCount
andIdChangeOutputCount
remote plugin messages, because it is simpler to always pass both the input and output counts.AudioDataType
because it was clunky to use, bloated the PR, and without a strong typedef it did nothing that couldn't be accomplished with a comment.Future directions
RemotePluginAudioPort
is kind of strange because it partially implements an audio buffer forRemotePlugin
rather than having its ownRemotePluginAudioBuffer
class which carries that responsibility. In the future aRemotePluginAudioBuffer
class which implementsPluginAudioBufferInterface
using shared memory should be created. This would require a refactor ofRemotePlugin
, including turning it into a class template. The correspondingRemotePluginClient
side could receive similar changes. I've explained this idea further in a comment inRemotePluginAudioPort.h
.