From cacfc0b379e309469eb046b76b7e7345e313caeb Mon Sep 17 00:00:00 2001 From: Robbert van der Helm Date: Thu, 10 Jun 2021 12:59:08 +0200 Subject: [PATCH] Fix serializing VST2 speaker arrangements --- CHANGELOG.md | 8 ++++++++ src/common/serialization/vst2.h | 4 ++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4a3a45ba..c1f2e061 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,14 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [Unreleased] + +### Fixed + +- Fixed VST2 speaker arrangement configurations returned by the plugin not being + serialized correctly. No plugins seem to actually use these, so it should not + have caused any issues. + ## [3.3.1] - 2021-06-09 ### Added diff --git a/src/common/serialization/vst2.h b/src/common/serialization/vst2.h index 6afe9b7d..c4f527f8 100644 --- a/src/common/serialization/vst2.h +++ b/src/common/serialization/vst2.h @@ -507,8 +507,8 @@ void serialize(S& s, Vst2EventResult::Payload& payload) { s.container1b(chunk.buffer, binary_buffer_size); }, [](S& s, AEffect& effect) { s.object(effect); }, - [&](DynamicSpeakerArrangement& speaker_arrangement) -> void* { - return &speaker_arrangement.as_c_speaker_arrangement(); + [](S& s, DynamicSpeakerArrangement& speaker_arrangement) { + s.object(speaker_arrangement); }, [](S& s, VstIOProperties& props) { s.object(props); }, [](S& s, VstMidiKeyName& key_name) { s.object(key_name); },