mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-06-12 23:32:11 +02:00
Implement IAudioProcessor::getTailSamples()
This commit is contained in:
@@ -37,7 +37,7 @@ void Vst3Logger::log_unknown_interface(
|
||||
}
|
||||
|
||||
void Vst3Logger::log_request(bool is_host_vst, const YaComponent::Construct&) {
|
||||
log_request_base(is_host_vst, [](auto& message) {
|
||||
log_request_base(is_host_vst, [&](auto& message) {
|
||||
// TODO: Log the CID on verbosity level 2, and then also report all CIDs
|
||||
// in the plugin factory
|
||||
message << "IPluginFactory::createComponent(cid = ..., _iid = "
|
||||
@@ -209,21 +209,29 @@ void Vst3Logger::log_request(bool is_host_vst,
|
||||
});
|
||||
}
|
||||
|
||||
void Vst3Logger::log_request(bool is_host_vst,
|
||||
const YaComponent::GetTailSamples& request) {
|
||||
log_request_base(is_host_vst, [&](auto& message) {
|
||||
message << "<IAudioProcessor* #" << request.instance_id
|
||||
<< ">::getTailSamples()";
|
||||
});
|
||||
}
|
||||
|
||||
void Vst3Logger::log_request(bool is_host_vst,
|
||||
const YaPluginFactory::Construct&) {
|
||||
log_request_base(is_host_vst,
|
||||
[](auto& message) { message << "GetPluginFactory()"; });
|
||||
[&](auto& message) { message << "GetPluginFactory()"; });
|
||||
}
|
||||
|
||||
void Vst3Logger::log_request(bool is_host_vst,
|
||||
const YaPluginFactory::SetHostContext&) {
|
||||
log_request_base(is_host_vst, [](auto& message) {
|
||||
log_request_base(is_host_vst, [&](auto& message) {
|
||||
message << "IPluginFactory3::setHostContext(IHostApplication*)";
|
||||
});
|
||||
}
|
||||
|
||||
void Vst3Logger::log_request(bool is_host_vst, const WantsConfiguration&) {
|
||||
log_request_base(is_host_vst, [](auto& message) {
|
||||
log_request_base(is_host_vst, [&](auto& message) {
|
||||
message << "Requesting <Configuration>";
|
||||
});
|
||||
}
|
||||
@@ -305,5 +313,5 @@ void Vst3Logger::log_response(bool is_host_vst,
|
||||
|
||||
void Vst3Logger::log_response(bool is_host_vst, const Configuration&) {
|
||||
log_response_base(is_host_vst,
|
||||
[](auto& message) { message << "<Configuration"; });
|
||||
[&](auto& message) { message << "<Configuration"; });
|
||||
}
|
||||
|
||||
@@ -75,6 +75,7 @@ class Vst3Logger {
|
||||
void log_request(bool is_host_vst, const YaComponent::GetLatencySamples&);
|
||||
void log_request(bool is_host_vst, const YaComponent::SetupProcessing&);
|
||||
void log_request(bool is_host_vst, const YaComponent::SetProcessing&);
|
||||
void log_request(bool is_host_vst, const YaComponent::GetTailSamples&);
|
||||
void log_request(bool is_host_vst, const YaPluginFactory::Construct&);
|
||||
void log_request(bool is_host_vst, const YaPluginFactory::SetHostContext&);
|
||||
void log_request(bool is_host_vst, const WantsConfiguration&);
|
||||
|
||||
@@ -75,6 +75,8 @@ using ControlRequest = std::variant<YaComponent::Construct,
|
||||
YaComponent::GetLatencySamples,
|
||||
YaComponent::SetupProcessing,
|
||||
YaComponent::SetProcessing,
|
||||
// TODO: YaComponent::Process
|
||||
YaComponent::GetTailSamples,
|
||||
YaPluginFactory::Construct,
|
||||
YaPluginFactory::SetHostContext>;
|
||||
|
||||
|
||||
@@ -582,6 +582,22 @@ class YaComponent : public Steinberg::Vst::IComponent,
|
||||
virtual tresult PLUGIN_API setProcessing(TBool state) override = 0;
|
||||
virtual tresult PLUGIN_API
|
||||
process(Steinberg::Vst::ProcessData& data) override = 0;
|
||||
|
||||
/**
|
||||
* Message to pass through a call to `IAudioProcessor::getTailSamples()`
|
||||
* to the Wine plugin host.
|
||||
*/
|
||||
struct GetTailSamples {
|
||||
using Response = PrimitiveWrapper<uint32>;
|
||||
|
||||
native_size_t instance_id;
|
||||
|
||||
template <typename S>
|
||||
void serialize(S& s) {
|
||||
s.value8b(instance_id);
|
||||
}
|
||||
};
|
||||
|
||||
virtual uint32 PLUGIN_API getTailSamples() override = 0;
|
||||
|
||||
protected:
|
||||
|
||||
Reference in New Issue
Block a user