-
Notifications
You must be signed in to change notification settings - Fork 103
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
added project load as explicit option #375
Conversation
So, If I remember well, we discussed and adding it implies deprecating |
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.
My opinion on this is still the same as before. CLAP_STATE_CONTEXT_FOR_PROJECT
is equivalent to the regular usage of the state extension, so adding it effectively either deprecates the state extension, or duplicates the functionality. I think it's a good idea to avoid duplicating functionality unless absolutely required. In this case not having CLAP_STATE_CONTEXT_FOR_PROJECT
means that both extensions can supplement each other. Most plugins won't need the state context, so they won't have to add support for it either. But if the functionality is duplicated, then now both plugins and hosts need to handle the situation where only one of the extensions is implemented. And worse, the behavior can be different between the old state extension and the CLAP_STATE_CONTEXT_FOR_PROJECT
state context.
The extension is indeed replacing the original state extension. But I don't see another way for this, since it does not fit the purpose. But we can not deprecate the original state extension for now.
When loading a song, the order of plugin restoration can not be determined. Therefore the absolute assignment to a device is crucial when loading a project. But it is not giving a pleasent user experience, if the connection would be part of the state it can be ignored if the state is used to restore "in duplicate" context or "a preset loaded" context. The distinction of the context is important here and the functionality can not be provided by the original state extension. I hope this clears things up a bit for you. |
|
Again, in theory, you're right - but to make it work well in a good user experience, it must like I've proposed - I already handle it this way in VST3 and hosts we recommend support that feature ("adding the And yes, if the state-context extension is present and supported, it should be used exclusively. |
So from what I read, it appears to me that it is unclear how If someone wants to clear this ambiguity, he then uses the state context extension. |
My original proposal does not need a context for the Indeed different |
So I’m super late and not that invested here but…. If this is just adding a context to the state extension, why not take a state extension instance as an argument. That is, yu have something like “set context for (clap state *, context)” then you require the implementation of state by api not just by documentation. The host then does set context for s and the load function manages the state internally with a guard. Gives you the awkward state maintenance but avoids duplicated load and save api points this may be a terrible idea and ignore it if it is |
@baconpaul the decorator api was suggested in the past but I didn't like it. Compare:
to:
The first approach feels more 'atomic' to me because there's only one call. |
Yeah that makes sense |
I think that the duplication of the What If we agree on that direction, then we need to adjust a bit the document for example:
|
Do we have a consensus? |
I would suggest you accept this PR and update the comments. |
the context "loading a project/song" is the most prominent example of using a context information for plugin state persistence. it is also implemented in other audio standards.
I also changed the order of the constants using 1 for the "if in doubt" option.