Commit Graph

8 Commits

Author SHA1 Message Date
Robbert van der Helm 6905c65af8 Read preset meta data in the same way as contexts 2021-01-12 16:07:56 +01:00
Robbert van der Helm e28a73e88a Remove old todo regarding IStreamAttributes 2021-01-10 17:45:58 +01:00
Robbert van der Helm d632d5643d Relax IBStream reading even further
And reset the seek position after reading. This new approach where we
also read from empty IBStreams to provide a perfect proxy would
otherwise cause plugins to crash in Bitwig when either loading or saving
state.
2021-01-10 17:41:55 +01:00
Robbert van der Helm 4fdd50d1a3 Relax assertions in stream reading
Reading 0 bytes in Bitwig will return kResultFalse.
2021-01-10 17:34:42 +01:00
Robbert van der Helm c514233922 Write back preset meta data set by the plugin
The docs don't mention that this is a thing you should support, but
`IStreamAttributes` doesn't make much sense without this.
2021-01-10 17:26:26 +01:00
Robbert van der Helm 8971a65825 Pass through host provided IBStream objects
So if the host supports IStreamAttributes, we can also provide objects
that support the same itnerface to the plugin.
2021-01-10 16:57:36 +01:00
Robbert van der Helm 9b603a964c Implement IStreamAttributes when reading from host
This allows presets to contain meta data about file names and the type
of preset.

Even though the docs don't mention that this is also relevant for
`getState()`, we should also implement it there so plugins can write
their own meta data.
2021-01-10 16:23:45 +01:00
Robbert van der Helm 9b62386099 Move VectorStream to a new YaBStream
We'll have to extend this with `IStreamAttributes` for VST 3.6.0 preset
meta data.
2021-01-10 15:12:47 +01:00