mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-07 20:10:13 +02:00
Don't cache IHostApplication::getName()
As it turns out there are only two or three functions where we can do this. It also breaks logging, and this function will probably only be called once anyways. More consistency is always better.
This commit is contained in:
@@ -42,6 +42,17 @@ Vst3HostContextProxyImpl::queryInterface(const Steinberg::TUID _iid,
|
||||
return result;
|
||||
}
|
||||
|
||||
tresult PLUGIN_API
|
||||
Vst3HostContextProxyImpl::getName(Steinberg::Vst::String128 name) {
|
||||
const GetNameResponse response = bridge.send_message(
|
||||
YaHostApplication::GetName{.owner_instance_id = owner_instance_id()});
|
||||
|
||||
std::copy(response.name.begin(), response.name.end(), name);
|
||||
name[response.name.size()] = 0;
|
||||
|
||||
return response.result;
|
||||
}
|
||||
|
||||
tresult PLUGIN_API
|
||||
Vst3HostContextProxyImpl::createInstance(Steinberg::TUID cid,
|
||||
Steinberg::TUID _iid,
|
||||
|
||||
@@ -31,6 +31,7 @@ class Vst3HostContextProxyImpl : public Vst3HostContextProxy {
|
||||
void** obj) override;
|
||||
|
||||
// From `IHostApplication`
|
||||
tresult PLUGIN_API getName(Steinberg::Vst::String128 name) override;
|
||||
tresult PLUGIN_API createInstance(Steinberg::TUID cid,
|
||||
Steinberg::TUID _iid,
|
||||
void** obj) override;
|
||||
|
||||
Reference in New Issue
Block a user