mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-06-10 06:12:14 +02:00
Implement IUnitInfo::getUnitCount
This commit is contained in:
@@ -430,6 +430,13 @@ bool Vst3Logger::log_request(bool is_host_vst,
|
||||
});
|
||||
}
|
||||
|
||||
bool Vst3Logger::log_request(bool is_host_vst,
|
||||
const YaUnitInfo::GetUnitCount& request) {
|
||||
return log_request_base(is_host_vst, [&](auto& message) {
|
||||
message << request.instance_id << ": IUnitInfo::getUnitCount()";
|
||||
});
|
||||
}
|
||||
|
||||
bool Vst3Logger::log_request(
|
||||
bool is_host_vst,
|
||||
const YaAudioProcessor::SetBusArrangements& request) {
|
||||
|
||||
@@ -108,6 +108,7 @@ class Vst3Logger {
|
||||
bool log_request(bool is_host_vst, const YaPluginBase::Terminate&);
|
||||
bool log_request(bool is_host_vst, const YaPluginFactory::Construct&);
|
||||
bool log_request(bool is_host_vst, const YaPluginFactory::SetHostContext&);
|
||||
bool log_request(bool is_host_vst, const YaUnitInfo::GetUnitCount&);
|
||||
|
||||
bool log_request(bool is_host_vst,
|
||||
const YaAudioProcessor::SetBusArrangements&);
|
||||
|
||||
@@ -99,7 +99,8 @@ using ControlRequest = std::variant<Vst3PlugViewProxy::Destruct,
|
||||
YaPluginBase::Initialize,
|
||||
YaPluginBase::Terminate,
|
||||
YaPluginFactory::Construct,
|
||||
YaPluginFactory::SetHostContext>;
|
||||
YaPluginFactory::SetHostContext,
|
||||
YaUnitInfo::GetUnitCount>;
|
||||
|
||||
template <typename S>
|
||||
void serialize(S& s, ControlRequest& payload) {
|
||||
|
||||
@@ -62,6 +62,21 @@ class YaUnitInfo : public Steinberg::Vst::IUnitInfo {
|
||||
|
||||
inline bool supported() const { return arguments.supported; }
|
||||
|
||||
/**
|
||||
* Message to pass through a call to `IUnitInfo::getUnitCount()` to the Wine
|
||||
* plugin host.
|
||||
*/
|
||||
struct GetUnitCount {
|
||||
using Response = UniversalTResult;
|
||||
|
||||
native_size_t instance_id;
|
||||
|
||||
template <typename S>
|
||||
void serialize(S& s) {
|
||||
s.value8b(instance_id);
|
||||
}
|
||||
};
|
||||
|
||||
virtual int32 PLUGIN_API getUnitCount() override = 0;
|
||||
virtual tresult PLUGIN_API
|
||||
getUnitInfo(int32 unitIndex,
|
||||
|
||||
Reference in New Issue
Block a user