mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-06-15 07:53:55 +02:00
Implement IUnitInfo::getSelectedUnit
This commit is contained in:
@@ -503,6 +503,13 @@ bool Vst3Logger::log_request(bool is_host_vst,
|
||||
});
|
||||
}
|
||||
|
||||
bool Vst3Logger::log_request(bool is_host_vst,
|
||||
const YaUnitInfo::GetSelectedUnit& request) {
|
||||
return log_request_base(is_host_vst, [&](auto& message) {
|
||||
message << request.instance_id << ": IUnitInfo::getSelectedUnit()";
|
||||
});
|
||||
}
|
||||
|
||||
bool Vst3Logger::log_request(
|
||||
bool is_host_vst,
|
||||
const YaAudioProcessor::SetBusArrangements& request) {
|
||||
|
||||
@@ -116,6 +116,7 @@ class Vst3Logger {
|
||||
bool log_request(bool is_host_vst, const YaUnitInfo::GetProgramInfo&);
|
||||
bool log_request(bool is_host_vst, const YaUnitInfo::HasProgramPitchNames&);
|
||||
bool log_request(bool is_host_vst, const YaUnitInfo::GetProgramPitchName&);
|
||||
bool log_request(bool is_host_vst, const YaUnitInfo::GetSelectedUnit&);
|
||||
|
||||
bool log_request(bool is_host_vst,
|
||||
const YaAudioProcessor::SetBusArrangements&);
|
||||
|
||||
@@ -107,7 +107,8 @@ using ControlRequest = std::variant<Vst3PlugViewProxy::Destruct,
|
||||
YaUnitInfo::GetProgramName,
|
||||
YaUnitInfo::GetProgramInfo,
|
||||
YaUnitInfo::HasProgramPitchNames,
|
||||
YaUnitInfo::GetProgramPitchName>;
|
||||
YaUnitInfo::GetProgramPitchName,
|
||||
YaUnitInfo::GetSelectedUnit>;
|
||||
|
||||
template <typename S>
|
||||
void serialize(S& s, ControlRequest& payload) {
|
||||
|
||||
@@ -324,6 +324,22 @@ class YaUnitInfo : public Steinberg::Vst::IUnitInfo {
|
||||
int32 programIndex,
|
||||
int16 midiPitch,
|
||||
Steinberg::Vst::String128 name /*out*/) override = 0;
|
||||
|
||||
/**
|
||||
* Message to pass through a call to `IUnitInfo::getSelectedUnit()` to the
|
||||
* Wine plugin host.
|
||||
*/
|
||||
struct GetSelectedUnit {
|
||||
using Response = PrimitiveWrapper<Steinberg::Vst::UnitID>;
|
||||
|
||||
native_size_t instance_id;
|
||||
|
||||
template <typename S>
|
||||
void serialize(S& s) {
|
||||
s.value8b(instance_id);
|
||||
}
|
||||
};
|
||||
|
||||
virtual Steinberg::Vst::UnitID PLUGIN_API getSelectedUnit() override = 0;
|
||||
virtual tresult PLUGIN_API
|
||||
selectUnit(Steinberg::Vst::UnitID unitId) override = 0;
|
||||
|
||||
Reference in New Issue
Block a user