From eebe4e467b45e051f6738e307da9eedbfb92491f Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Mon, 29 Mar 2021 14:48:01 +0200 Subject: [PATCH] VST3: pass a read-only state stream to the plugin #8642 see also 9e7cfdd8806 - this is a workaround for some plugins that do not use the SDK and seek the stream using absolute offsets. --- libs/ardour/vst3_plugin.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/ardour/vst3_plugin.cc b/libs/ardour/vst3_plugin.cc index 0506f2d9a8..73fe843b97 100644 --- a/libs/ardour/vst3_plugin.cc +++ b/libs/ardour/vst3_plugin.cc @@ -2287,8 +2287,8 @@ VST3PI::load_state (RAMStream& stream) rv = false; } } else if (is_equal_ID (i->_id, Vst::getChunkID (Vst::kControllerState))) { - stream.seek (i->_offset, IBStream::kIBSeekSet, &seek_result); - tresult res = _controller->setState (&stream); + ROMStream s (stream, i->_offset, i->_size); + tresult res = _controller->setState (&s); if (res == kResultOk) { synced = true; }