mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-10 04:30:12 +02:00
Fully implement IAudioPresentationLatency
Now we support all VST 3.1.0 interfaces.
This commit is contained in:
@@ -68,6 +68,7 @@ using ControlRequest =
|
|||||||
Vst3PluginProxy::Destruct,
|
Vst3PluginProxy::Destruct,
|
||||||
Vst3PluginProxy::SetState,
|
Vst3PluginProxy::SetState,
|
||||||
Vst3PluginProxy::GetState,
|
Vst3PluginProxy::GetState,
|
||||||
|
YaAudioPresentationLatency::SetAudioPresentationLatencySamples,
|
||||||
YaConnectionPoint::Connect,
|
YaConnectionPoint::Connect,
|
||||||
YaConnectionPoint::Disconnect,
|
YaConnectionPoint::Disconnect,
|
||||||
YaConnectionPoint::Notify,
|
YaConnectionPoint::Notify,
|
||||||
|
|||||||
@@ -43,11 +43,12 @@ tresult PLUGIN_API Vst3PluginProxyImpl::setAudioPresentationLatencySamples(
|
|||||||
Steinberg::Vst::BusDirection dir,
|
Steinberg::Vst::BusDirection dir,
|
||||||
int32 busIndex,
|
int32 busIndex,
|
||||||
uint32 latencyInSamples) {
|
uint32 latencyInSamples) {
|
||||||
// TODO: Implement
|
return bridge.send_message(
|
||||||
bridge.logger.log(
|
YaAudioPresentationLatency::SetAudioPresentationLatencySamples{
|
||||||
"TODO: "
|
.instance_id = instance_id(),
|
||||||
"IAudioPresentationLatency::setAudioPresentationLatencySamples()");
|
.dir = dir,
|
||||||
return Steinberg::kNotImplemented;
|
.bus_index = busIndex,
|
||||||
|
.latency_in_samples = latencyInSamples});
|
||||||
}
|
}
|
||||||
|
|
||||||
tresult PLUGIN_API Vst3PluginProxyImpl::setBusArrangements(
|
tresult PLUGIN_API Vst3PluginProxyImpl::setBusArrangements(
|
||||||
|
|||||||
@@ -36,6 +36,7 @@ InstanceInterfaces::InstanceInterfaces() {}
|
|||||||
InstanceInterfaces::InstanceInterfaces(
|
InstanceInterfaces::InstanceInterfaces(
|
||||||
Steinberg::IPtr<Steinberg::FUnknown> object)
|
Steinberg::IPtr<Steinberg::FUnknown> object)
|
||||||
: object(object),
|
: object(object),
|
||||||
|
audio_presentation_latency(object),
|
||||||
audio_processor(object),
|
audio_processor(object),
|
||||||
component(object),
|
component(object),
|
||||||
connection_point(object),
|
connection_point(object),
|
||||||
@@ -183,6 +184,16 @@ void Vst3Bridge::run() {
|
|||||||
return Vst3PluginProxy::GetStateResponse{
|
return Vst3PluginProxy::GetStateResponse{
|
||||||
.result = result, .updated_state = std::move(stream)};
|
.result = result, .updated_state = std::move(stream)};
|
||||||
},
|
},
|
||||||
|
[&](YaAudioPresentationLatency::SetAudioPresentationLatencySamples&
|
||||||
|
request)
|
||||||
|
-> YaAudioPresentationLatency::
|
||||||
|
SetAudioPresentationLatencySamples::Response {
|
||||||
|
return object_instances[request.instance_id]
|
||||||
|
.audio_presentation_latency
|
||||||
|
->setAudioPresentationLatencySamples(
|
||||||
|
request.dir, request.bus_index,
|
||||||
|
request.latency_in_samples);
|
||||||
|
},
|
||||||
[&](YaConnectionPoint::Connect& request)
|
[&](YaConnectionPoint::Connect& request)
|
||||||
-> YaConnectionPoint::Connect::Response {
|
-> YaConnectionPoint::Connect::Response {
|
||||||
// If the host directly connected the underlying objects then we
|
// If the host directly connected the underlying objects then we
|
||||||
|
|||||||
@@ -128,6 +128,8 @@ struct InstanceInterfaces {
|
|||||||
// All smart pointers below are created from `component`. They will be null
|
// All smart pointers below are created from `component`. They will be null
|
||||||
// pointers if `component` did not implement the interface.
|
// pointers if `component` did not implement the interface.
|
||||||
|
|
||||||
|
Steinberg::FUnknownPtr<Steinberg::Vst::IAudioPresentationLatency>
|
||||||
|
audio_presentation_latency;
|
||||||
Steinberg::FUnknownPtr<Steinberg::Vst::IAudioProcessor> audio_processor;
|
Steinberg::FUnknownPtr<Steinberg::Vst::IAudioProcessor> audio_processor;
|
||||||
Steinberg::FUnknownPtr<Steinberg::Vst::IComponent> component;
|
Steinberg::FUnknownPtr<Steinberg::Vst::IComponent> component;
|
||||||
Steinberg::FUnknownPtr<Steinberg::Vst::IConnectionPoint> connection_point;
|
Steinberg::FUnknownPtr<Steinberg::Vst::IConnectionPoint> connection_point;
|
||||||
|
|||||||
Reference in New Issue
Block a user