mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-07 12:10:09 +02:00
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:
@@ -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 << ">)";
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user