From 9b62386099542cfb886d5026a2181d1dec950690 Mon Sep 17 00:00:00 2001 From: Robbert van der Helm Date: Sun, 10 Jan 2021 15:11:19 +0100 Subject: [PATCH] Move VectorStream to a new YaBStream We'll have to extend this with `IStreamAttributes` for VST 3.6.0 preset meta data. --- meson.build | 2 + src/common/serialization/vst3/README.md | 20 +- src/common/serialization/vst3/base.cpp | 156 ---------------- src/common/serialization/vst3/base.h | 65 ------- src/common/serialization/vst3/bstream.cpp | 176 ++++++++++++++++++ src/common/serialization/vst3/bstream.h | 85 +++++++++ src/common/serialization/vst3/plugin-proxy.h | 4 +- .../vst3/plugin/edit-controller.h | 3 +- .../vst3/plugin/program-list-data.h | 5 +- .../serialization/vst3/plugin/unit-data.h | 5 +- .../serialization/vst3/plugin/unit-info.h | 3 +- .../plugin/xml-representation-controller.h | 3 +- src/wine-host/bridges/vst3.cpp | 8 +- 13 files changed, 291 insertions(+), 244 deletions(-) create mode 100644 src/common/serialization/vst3/bstream.cpp create mode 100644 src/common/serialization/vst3/bstream.h diff --git a/meson.build b/meson.build index 7bc7abf1..87a6618e 100644 --- a/meson.build +++ b/meson.build @@ -137,6 +137,7 @@ vst3_plugin_sources = [ 'src/common/serialization/vst3/plugin/xml-representation-controller.cpp', 'src/common/serialization/vst3/attribute-list.cpp', 'src/common/serialization/vst3/base.cpp', + 'src/common/serialization/vst3/bstream.cpp', 'src/common/serialization/vst3/component-handler-proxy.cpp', 'src/common/serialization/vst3/connection-point-proxy.cpp', 'src/common/serialization/vst3/context-menu-proxy.cpp', @@ -210,6 +211,7 @@ if with_vst3 'src/common/serialization/vst3/plugin/xml-representation-controller.cpp', 'src/common/serialization/vst3/attribute-list.cpp', 'src/common/serialization/vst3/base.cpp', + 'src/common/serialization/vst3/bstream.cpp', 'src/common/serialization/vst3/component-handler-proxy.cpp', 'src/common/serialization/vst3/connection-point-proxy.cpp', 'src/common/serialization/vst3/context-menu-proxy.cpp', diff --git a/src/common/serialization/vst3/README.md b/src/common/serialization/vst3/README.md index 975d5d64..1f2f192e 100644 --- a/src/common/serialization/vst3/README.md +++ b/src/common/serialization/vst3/README.md @@ -55,16 +55,16 @@ VST3 host interfaces are implemented as follows: The following host interfaces are passed as function arguments and are thus also implemented for serialization purposes: -| yabridge class | Interfaces | Notes | -| --------------------- | -------------------- | --------------------------------------------------------------------- | -| `YaAttributeList` | `IAttributeList` | | -| `YaContextMenuTarget` | `IContextMenuTarget` | Used in `YaContextMenu` to proxy specific menu items | -| `YaEventList` | `IEventList` | Comes with a lot of serialization wrappers around the related structs | -| `YaMessage` | `IMessage` | | -| `YaMessagePtr` | `IMessage` | Should be used in inter process communication to exchange messages | -| `YaParameterChanges` | `IParameterChanges` | | -| `YaParamValueQueue` | `IParamValueQueue` | | -| `VectorStream` | `IBStream` | Used for serializing data streams | +| yabridge class | Interfaces | Notes | +| --------------------- | ----------------------------- | --------------------------------------------------------------------- | +| `YaAttributeList` | `IAttributeList` | | +| `YaBStream` | `IBStream`, `ISizeableStream` | Used for serializing data streams | +| `YaContextMenuTarget` | `IContextMenuTarget` | Used in `YaContextMenu` to proxy specific menu items | +| `YaEventList` | `IEventList` | Comes with a lot of serialization wrappers around the related structs | +| `YaMessage` | `IMessage` | | +| `YaMessagePtr` | `IMessage` | Should be used in inter process communication to exchange messages | +| `YaParameterChanges` | `IParameterChanges` | | +| `YaParamValueQueue` | `IParamValueQueue` | | And finally `YaProcessData` uses the above along with `YaAudioBusBuffers` to wrap around `ProcessData`. diff --git a/src/common/serialization/vst3/base.cpp b/src/common/serialization/vst3/base.cpp index 2acbc9b3..69ae61a5 100644 --- a/src/common/serialization/vst3/base.cpp +++ b/src/common/serialization/vst3/base.cpp @@ -172,159 +172,3 @@ UniversalTResult::Value UniversalTResult::to_universal_result( break; } } - -VectorStream::VectorStream(){FUNKNOWN_CTOR} - -VectorStream::VectorStream(Steinberg::IBStream* stream) { - FUNKNOWN_CTOR - - if (!stream) { - throw std::runtime_error("Null pointer passed to VectorStream()"); - } - - if (stream->seek(0, Steinberg::IBStream::IStreamSeekMode::kIBSeekEnd) != - Steinberg::kResultOk) { - throw std::runtime_error( - "IBStream passed to VectorStream() does not suport seeking to end"); - } - - // Now that we're at the end of the stream we know how large the buffer - // should be - int64 size; - assert(stream->tell(&size) == Steinberg::kResultOk); - - int32 num_bytes_read = 0; - buffer.resize(size); - assert(stream->seek(0, Steinberg::IBStream::IStreamSeekMode::kIBSeekSet) == - Steinberg::kResultOk); - assert(stream->read(buffer.data(), size, &num_bytes_read) == - Steinberg::kResultOk); - assert(num_bytes_read == 0 || num_bytes_read == size); -} - -VectorStream::~VectorStream() { - FUNKNOWN_DTOR -} - -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wdelete-non-virtual-dtor" -IMPLEMENT_REFCOUNT(VectorStream) -#pragma GCC diagnostic pop - -tresult PLUGIN_API VectorStream::queryInterface(Steinberg::FIDString _iid, - void** obj) { - QUERY_INTERFACE(_iid, obj, Steinberg::FUnknown::iid, Steinberg::IBStream) - QUERY_INTERFACE(_iid, obj, Steinberg::IBStream::iid, Steinberg::IBStream) - QUERY_INTERFACE(_iid, obj, Steinberg::ISizeableStream::iid, - Steinberg::ISizeableStream) - - *obj = nullptr; - return Steinberg::kNoInterface; -} - -tresult VectorStream::write_back(Steinberg::IBStream* stream) const { - if (!stream) { - return Steinberg::kInvalidArgument; - } - - // A `stream->seek(0, kIBSeekSet)` breaks restoring states in Bitwig. Not - // sure if Bitwig is prepending a header or if this is expected behaviour. - int32 num_bytes_written = 0; - if (stream->write(const_cast(buffer.data()), buffer.size(), - &num_bytes_written) == Steinberg::kResultOk) { - // Some implementations will return `kResultFalse` when writing 0 bytes - assert(num_bytes_written == 0 || - static_cast(num_bytes_written) == buffer.size()); - } - - return Steinberg::kResultOk; -} - -size_t VectorStream::size() const { - return buffer.size(); -} - -tresult PLUGIN_API VectorStream::read(void* buffer, - int32 numBytes, - int32* numBytesRead) { - if (!buffer || numBytes < 0) { - return Steinberg::kInvalidArgument; - } - - size_t bytes_to_read = std::min(static_cast(numBytes), - this->buffer.size() - seek_position); - - std::copy_n(&this->buffer[seek_position], bytes_to_read, - reinterpret_cast(buffer)); - - seek_position += bytes_to_read; - if (numBytesRead) { - *numBytesRead = bytes_to_read; - } - - return Steinberg::kResultOk; -} - -tresult PLUGIN_API VectorStream::write(void* buffer, - int32 numBytes, - int32* numBytesWritten) { - if (!buffer || numBytes < 0) { - return Steinberg::kInvalidArgument; - } - - if (seek_position + numBytes > this->buffer.size()) { - this->buffer.resize(seek_position + numBytes); - } - - std::copy_n(reinterpret_cast(buffer), numBytes, - this->buffer.begin() + seek_position); - - seek_position += numBytes; - if (numBytesWritten) { - *numBytesWritten = numBytes; - } - - return Steinberg::kResultOk; -} - -tresult PLUGIN_API VectorStream::seek(int64 pos, int32 mode, int64* result) { - switch (mode) { - case kIBSeekSet: - seek_position = pos; - break; - case kIBSeekCur: - seek_position += pos; - break; - case kIBSeekEnd: - seek_position = this->buffer.size() + pos; - break; - default: - return Steinberg::kInvalidArgument; - break; - } - - if (result) { - *result = seek_position; - } - - return Steinberg::kResultOk; -} - -tresult PLUGIN_API VectorStream::tell(int64* pos) { - if (pos) { - *pos = seek_position; - return Steinberg::kResultOk; - } else { - return Steinberg::kInvalidArgument; - } -} - -tresult PLUGIN_API VectorStream::getStreamSize(int64& size) { - size = seek_position; - return Steinberg::kResultOk; -} - -tresult PLUGIN_API VectorStream::setStreamSize(int64 size) { - buffer.resize(size); - return Steinberg::kResultOk; -} diff --git a/src/common/serialization/vst3/base.h b/src/common/serialization/vst3/base.h index 46a9d182..f5781650 100644 --- a/src/common/serialization/vst3/base.h +++ b/src/common/serialization/vst3/base.h @@ -22,7 +22,6 @@ #include #include -#include #include // Yet Another layer of includes, but these are some VST3-specific typedefs that @@ -165,67 +164,3 @@ class UniversalTResult { Value universal_result; }; - -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wnon-virtual-dtor" - -/** - * Serialize an `IBStream` into an `std::vector`, and allow the - * receiving side to use it as an `IBStream` again. `ISizeableStream` is defined - * but then for whatever reason never used, but we'll implement it anyways. - */ -class VectorStream : public Steinberg::IBStream, - public Steinberg::ISizeableStream { - public: - VectorStream(); - - /** - * Read an existing stream. - * - * @throw std::runtime_error If we couldn't read from the stream. - */ - VectorStream(Steinberg::IBStream* stream); - - virtual ~VectorStream(); - - DECLARE_FUNKNOWN_METHODS - - /** - * Write the vector buffer back to an IBStream. After writing the seek - * position will be left at the end of the stream. - */ - tresult write_back(Steinberg::IBStream* stream) const; - - /** - * Return the buffer's, used in the logging messages. - */ - size_t size() const; - - // From `IBstream` - tresult PLUGIN_API read(void* buffer, - int32 numBytes, - int32* numBytesRead = nullptr) override; - tresult PLUGIN_API write(void* buffer, - int32 numBytes, - int32* numBytesWritten = nullptr) override; - tresult PLUGIN_API seek(int64 pos, - int32 mode, - int64* result = nullptr) override; - tresult PLUGIN_API tell(int64* pos) override; - - // From `ISizeableStream` - tresult PLUGIN_API getStreamSize(int64& size) override; - tresult PLUGIN_API setStreamSize(int64 size) override; - - template - void serialize(S& s) { - s.container1b(buffer, max_vector_stream_size); - // The seek position should always be initialized at 0 - } - - private: - std::vector buffer; - size_t seek_position = 0; -}; - -#pragma GCC diagnostic pop diff --git a/src/common/serialization/vst3/bstream.cpp b/src/common/serialization/vst3/bstream.cpp new file mode 100644 index 00000000..dab57aba --- /dev/null +++ b/src/common/serialization/vst3/bstream.cpp @@ -0,0 +1,176 @@ +// yabridge: a Wine VST bridge +// Copyright (C) 2020-2021 Robbert van der Helm +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +#include "bstream.h" + +#include +#include + +YaBStream::YaBStream(){FUNKNOWN_CTOR} + +YaBStream::YaBStream(Steinberg::IBStream* stream) { + FUNKNOWN_CTOR + + if (!stream) { + throw std::runtime_error("Null pointer passed to YaBStream()"); + } + + if (stream->seek(0, Steinberg::IBStream::IStreamSeekMode::kIBSeekEnd) != + Steinberg::kResultOk) { + throw std::runtime_error( + "IBStream passed to YaBStream() does not suport seeking to end"); + } + + // Now that we're at the end of the stream we know how large the buffer + // should be + int64 size; + assert(stream->tell(&size) == Steinberg::kResultOk); + + int32 num_bytes_read = 0; + buffer.resize(size); + assert(stream->seek(0, Steinberg::IBStream::IStreamSeekMode::kIBSeekSet) == + Steinberg::kResultOk); + assert(stream->read(buffer.data(), size, &num_bytes_read) == + Steinberg::kResultOk); + assert(num_bytes_read == 0 || num_bytes_read == size); +} + +YaBStream::~YaBStream() { + FUNKNOWN_DTOR +} + +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdelete-non-virtual-dtor" +IMPLEMENT_REFCOUNT(YaBStream) +#pragma GCC diagnostic pop + +tresult PLUGIN_API YaBStream::queryInterface(Steinberg::FIDString _iid, + void** obj) { + QUERY_INTERFACE(_iid, obj, Steinberg::FUnknown::iid, Steinberg::IBStream) + QUERY_INTERFACE(_iid, obj, Steinberg::IBStream::iid, Steinberg::IBStream) + QUERY_INTERFACE(_iid, obj, Steinberg::ISizeableStream::iid, + Steinberg::ISizeableStream) + + *obj = nullptr; + return Steinberg::kNoInterface; +} + +tresult YaBStream::write_back(Steinberg::IBStream* stream) const { + if (!stream) { + return Steinberg::kInvalidArgument; + } + + // A `stream->seek(0, kIBSeekSet)` breaks restoring states in Bitwig. Not + // sure if Bitwig is prepending a header or if this is expected behaviour. + int32 num_bytes_written = 0; + if (stream->write(const_cast(buffer.data()), buffer.size(), + &num_bytes_written) == Steinberg::kResultOk) { + // Some implementations will return `kResultFalse` when writing 0 bytes + assert(num_bytes_written == 0 || + static_cast(num_bytes_written) == buffer.size()); + } + + return Steinberg::kResultOk; +} + +size_t YaBStream::size() const { + return buffer.size(); +} + +tresult PLUGIN_API YaBStream::read(void* buffer, + int32 numBytes, + int32* numBytesRead) { + if (!buffer || numBytes < 0) { + return Steinberg::kInvalidArgument; + } + + size_t bytes_to_read = std::min(static_cast(numBytes), + this->buffer.size() - seek_position); + + std::copy_n(&this->buffer[seek_position], bytes_to_read, + reinterpret_cast(buffer)); + + seek_position += bytes_to_read; + if (numBytesRead) { + *numBytesRead = bytes_to_read; + } + + return Steinberg::kResultOk; +} + +tresult PLUGIN_API YaBStream::write(void* buffer, + int32 numBytes, + int32* numBytesWritten) { + if (!buffer || numBytes < 0) { + return Steinberg::kInvalidArgument; + } + + if (seek_position + numBytes > this->buffer.size()) { + this->buffer.resize(seek_position + numBytes); + } + + std::copy_n(reinterpret_cast(buffer), numBytes, + this->buffer.begin() + seek_position); + + seek_position += numBytes; + if (numBytesWritten) { + *numBytesWritten = numBytes; + } + + return Steinberg::kResultOk; +} + +tresult PLUGIN_API YaBStream::seek(int64 pos, int32 mode, int64* result) { + switch (mode) { + case kIBSeekSet: + seek_position = pos; + break; + case kIBSeekCur: + seek_position += pos; + break; + case kIBSeekEnd: + seek_position = this->buffer.size() + pos; + break; + default: + return Steinberg::kInvalidArgument; + break; + } + + if (result) { + *result = seek_position; + } + + return Steinberg::kResultOk; +} + +tresult PLUGIN_API YaBStream::tell(int64* pos) { + if (pos) { + *pos = seek_position; + return Steinberg::kResultOk; + } else { + return Steinberg::kInvalidArgument; + } +} + +tresult PLUGIN_API YaBStream::getStreamSize(int64& size) { + size = seek_position; + return Steinberg::kResultOk; +} + +tresult PLUGIN_API YaBStream::setStreamSize(int64 size) { + buffer.resize(size); + return Steinberg::kResultOk; +} diff --git a/src/common/serialization/vst3/bstream.h b/src/common/serialization/vst3/bstream.h new file mode 100644 index 00000000..3e6df193 --- /dev/null +++ b/src/common/serialization/vst3/bstream.h @@ -0,0 +1,85 @@ +// yabridge: a Wine VST bridge +// Copyright (C) 2020-2021 Robbert van der Helm +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +#pragma once + +#include + +#include "base.h" + +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wnon-virtual-dtor" + +/** + * Serialize an `IBStream` into an `std::vector`, and allow the + * receiving side to use it as an `IBStream` again. `ISizeableStream` is defined + * but then for whatever reason never used, but we'll implement it anyways. + */ +class YaBStream : public Steinberg::IBStream, + public Steinberg::ISizeableStream { + public: + YaBStream(); + + /** + * Read an existing stream. + * + * @throw std::runtime_error If we couldn't read from the stream. + */ + YaBStream(Steinberg::IBStream* stream); + + virtual ~YaBStream(); + + DECLARE_FUNKNOWN_METHODS + + /** + * Write the vector buffer back to an IBStream. After writing the seek + * position will be left at the end of the stream. + */ + tresult write_back(Steinberg::IBStream* stream) const; + + /** + * Return the buffer's, used in the logging messages. + */ + size_t size() const; + + // From `IBstream` + tresult PLUGIN_API read(void* buffer, + int32 numBytes, + int32* numBytesRead = nullptr) override; + tresult PLUGIN_API write(void* buffer, + int32 numBytes, + int32* numBytesWritten = nullptr) override; + tresult PLUGIN_API seek(int64 pos, + int32 mode, + int64* result = nullptr) override; + tresult PLUGIN_API tell(int64* pos) override; + + // From `ISizeableStream` + tresult PLUGIN_API getStreamSize(int64& size) override; + tresult PLUGIN_API setStreamSize(int64 size) override; + + template + void serialize(S& s) { + s.container1b(buffer, max_vector_stream_size); + // The seek position should always be initialized at 0 + } + + private: + std::vector buffer; + size_t seek_position = 0; +}; + +#pragma GCC diagnostic pop diff --git a/src/common/serialization/vst3/plugin-proxy.h b/src/common/serialization/vst3/plugin-proxy.h index 62460094..6686db67 100644 --- a/src/common/serialization/vst3/plugin-proxy.h +++ b/src/common/serialization/vst3/plugin-proxy.h @@ -214,7 +214,7 @@ class Vst3PluginProxy : public YaAudioPresentationLatency, native_size_t instance_id; - VectorStream state; + YaBStream state; template void serialize(S& s) { @@ -229,7 +229,7 @@ class Vst3PluginProxy : public YaAudioPresentationLatency, */ struct GetStateResponse { UniversalTResult result; - VectorStream updated_state; + YaBStream updated_state; template void serialize(S& s) { diff --git a/src/common/serialization/vst3/plugin/edit-controller.h b/src/common/serialization/vst3/plugin/edit-controller.h index 2610b907..9acf47da 100644 --- a/src/common/serialization/vst3/plugin/edit-controller.h +++ b/src/common/serialization/vst3/plugin/edit-controller.h @@ -21,6 +21,7 @@ #include "../../common.h" #include "../base.h" +#include "../bstream.h" #include "../component-handler-proxy.h" #include "../plug-view-proxy.h" @@ -73,7 +74,7 @@ class YaEditController : public Steinberg::Vst::IEditController { native_size_t instance_id; - VectorStream state; + YaBStream state; template void serialize(S& s) { diff --git a/src/common/serialization/vst3/plugin/program-list-data.h b/src/common/serialization/vst3/plugin/program-list-data.h index 87d6d9a2..5ef721ae 100644 --- a/src/common/serialization/vst3/plugin/program-list-data.h +++ b/src/common/serialization/vst3/plugin/program-list-data.h @@ -20,6 +20,7 @@ #include "../../common.h" #include "../base.h" +#include "../bstream.h" #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wnon-virtual-dtor" @@ -89,7 +90,7 @@ class YaProgramListData : public Steinberg::Vst::IProgramListData { */ struct GetProgramDataResponse { UniversalTResult result; - VectorStream data; + YaBStream data; template void serialize(S& s) { @@ -136,7 +137,7 @@ class YaProgramListData : public Steinberg::Vst::IProgramListData { Steinberg::Vst::ProgramListID list_id; int32 program_index; - VectorStream data; + YaBStream data; template void serialize(S& s) { diff --git a/src/common/serialization/vst3/plugin/unit-data.h b/src/common/serialization/vst3/plugin/unit-data.h index 77278e07..8ff7b29e 100644 --- a/src/common/serialization/vst3/plugin/unit-data.h +++ b/src/common/serialization/vst3/plugin/unit-data.h @@ -20,6 +20,7 @@ #include "../../common.h" #include "../base.h" +#include "../bstream.h" #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wnon-virtual-dtor" @@ -88,7 +89,7 @@ class YaUnitData : public Steinberg::Vst::IUnitData { */ struct GetUnitDataResponse { UniversalTResult result; - VectorStream data; + YaBStream data; template void serialize(S& s) { @@ -129,7 +130,7 @@ class YaUnitData : public Steinberg::Vst::IUnitData { native_size_t instance_id; Steinberg::Vst::UnitID unit_id; - VectorStream data; + YaBStream data; template void serialize(S& s) { diff --git a/src/common/serialization/vst3/plugin/unit-info.h b/src/common/serialization/vst3/plugin/unit-info.h index ae39851b..ebb8ab71 100644 --- a/src/common/serialization/vst3/plugin/unit-info.h +++ b/src/common/serialization/vst3/plugin/unit-info.h @@ -20,6 +20,7 @@ #include "../../common.h" #include "../base.h" +#include "../bstream.h" #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wnon-virtual-dtor" @@ -420,7 +421,7 @@ class YaUnitInfo : public Steinberg::Vst::IUnitInfo { int32 list_or_unit_id; int32 program_index; - VectorStream data; + YaBStream data; template void serialize(S& s) { diff --git a/src/common/serialization/vst3/plugin/xml-representation-controller.h b/src/common/serialization/vst3/plugin/xml-representation-controller.h index fb6e223f..770d44cb 100644 --- a/src/common/serialization/vst3/plugin/xml-representation-controller.h +++ b/src/common/serialization/vst3/plugin/xml-representation-controller.h @@ -20,6 +20,7 @@ #include "../../common.h" #include "../base.h" +#include "../bstream.h" #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wnon-virtual-dtor" @@ -75,7 +76,7 @@ class YaXmlRepresentationController */ struct GetXmlRepresentationStreamResponse { UniversalTResult result; - VectorStream stream; + YaBStream stream; template void serialize(S& s) { diff --git a/src/wine-host/bridges/vst3.cpp b/src/wine-host/bridges/vst3.cpp index 2b5c9127..441e5331 100644 --- a/src/wine-host/bridges/vst3.cpp +++ b/src/wine-host/bridges/vst3.cpp @@ -172,7 +172,7 @@ void Vst3Bridge::run() { }, [&](Vst3PluginProxy::GetState& request) -> Vst3PluginProxy::GetState::Response { - VectorStream stream{}; + YaBStream stream{}; tresult result; // This same function is defined in both `IComponent` and @@ -741,7 +741,7 @@ void Vst3Bridge::run() { }, [&](const YaProgramListData::GetProgramData& request) -> YaProgramListData::GetProgramData::Response { - VectorStream data{}; + YaBStream data{}; const tresult result = object_instances[request.instance_id] .program_list_data->getProgramData( @@ -763,7 +763,7 @@ void Vst3Bridge::run() { }, [&](const YaUnitData::GetUnitData& request) -> YaUnitData::GetUnitData::Response { - VectorStream data{}; + YaBStream data{}; const tresult result = object_instances[request.instance_id] .unit_data->getUnitData(request.unit_id, &data); @@ -898,7 +898,7 @@ void Vst3Bridge::run() { [&](YaXmlRepresentationController::GetXmlRepresentationStream& request) -> YaXmlRepresentationController:: GetXmlRepresentationStream::Response { - VectorStream stream{}; + YaBStream stream{}; const tresult result = object_instances[request.instance_id] .xml_representation_controller