Pass pointers to IMessage objects around

Instead of serializing the actual `YaMessage`, for the reasons mentioned
in the comments. This was needed to stop iZotope VocalSynth 2 in Ardour
from segfaulting when editing parameters, because that plugin is
apparently being very naughty.
This commit is contained in:
Robbert van der Helm
2020-12-28 13:19:34 +01:00
parent 2c3312b452
commit 4226ab6e43
9 changed files with 181 additions and 53 deletions
+6 -4
View File
@@ -126,13 +126,15 @@ bool Vst3Logger::log_request(bool is_host_vst,
bool Vst3Logger::log_request(bool is_host_vst,
const YaConnectionPoint::Notify& request) {
return log_request_base(is_host_vst, [&](auto& message) {
// We can safely print the pointer as long we don't dereference it
message << request.instance_id
<< ": IConnectionPoint::notify(message = <IMessage* ";
<< ": IConnectionPoint::notify(message = <IMessage* "
<< request.message_ptr.get_original();
if (const char* id =
const_cast<YaMessage&>(request.message).getMessageID()) {
message << "with ID = \"" << id << "\"";
const_cast<YaMessagePtr&>(request.message_ptr).getMessageID()) {
message << " with ID = \"" << id << "\"";
} else {
message << "without an ID";
message << " without an ID";
}
message << ">)";
});