Add a function for copying channel contexts

For proxying `IInfoListener::setChannelContextInfos`.
This commit is contained in:
Robbert van der Helm
2021-01-12 16:01:34 +01:00
parent 87b270273f
commit 149be2f8f9
2 changed files with 75 additions and 0 deletions
@@ -49,6 +49,17 @@ class YaAttributeList : public Steinberg::Vst::IAttributeList {
*/
tresult write_back(Steinberg::Vst::IAttributeList* stream) const;
/**
* Read the channel context info passed to
* `IInfoListener::setChannelContextInfos` into a `YaAttributeList`. We
* normally can't serialize any arbitrary `IAttributeList` because there's
* no way to enumerate the keys, but in this case the keys are fixed. This
* works in a similar was as reading preset meta data in
* `IStreamAttributes`.
*/
static YaAttributeList read_channel_context(
Steinberg::Vst::IAttributeList* context);
virtual tresult PLUGIN_API setInt(AttrID id, int64 value) override;
virtual tresult PLUGIN_API getInt(AttrID id, int64& value) override;
virtual tresult PLUGIN_API setFloat(AttrID id, double value) override;