13
0

VST3: pass a read-only state stream to the plugin #8642

see also 9e7cfdd880 - this is a workaround for some plugins
that do not use the SDK and seek the stream using absolute
offsets.
This commit is contained in:
Robin Gareus 2021-03-29 14:48:01 +02:00
parent 1bffdfc334
commit eebe4e467b
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04

View File

@ -2287,8 +2287,8 @@ VST3PI::load_state (RAMStream& stream)
rv = false; rv = false;
} }
} else if (is_equal_ID (i->_id, Vst::getChunkID (Vst::kControllerState))) { } else if (is_equal_ID (i->_id, Vst::getChunkID (Vst::kControllerState))) {
stream.seek (i->_offset, IBStream::kIBSeekSet, &seek_result); ROMStream s (stream, i->_offset, i->_size);
tresult res = _controller->setState (&stream); tresult res = _controller->setState (&s);
if (res == kResultOk) { if (res == kResultOk) {
synced = true; synced = true;
} }