mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-09 20:29:10 +02:00
Implement IUnitInfo::hasProgramPitchNames
This commit is contained in:
@@ -482,6 +482,16 @@ bool Vst3Logger::log_request(bool is_host_vst,
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool Vst3Logger::log_request(bool is_host_vst,
|
||||||
|
const YaUnitInfo::HasProgramPitchNames& request) {
|
||||||
|
return log_request_base(is_host_vst, [&](auto& message) {
|
||||||
|
message << request.instance_id
|
||||||
|
<< ": IUnitInfo::hasProgramPitchNames(listId = "
|
||||||
|
<< request.list_id
|
||||||
|
<< ", programIndex = " << request.program_index << ")";
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
bool Vst3Logger::log_request(
|
bool Vst3Logger::log_request(
|
||||||
bool is_host_vst,
|
bool is_host_vst,
|
||||||
const YaAudioProcessor::SetBusArrangements& request) {
|
const YaAudioProcessor::SetBusArrangements& request) {
|
||||||
|
|||||||
@@ -114,6 +114,7 @@ class Vst3Logger {
|
|||||||
bool log_request(bool is_host_vst, const YaUnitInfo::GetProgramListInfo&);
|
bool log_request(bool is_host_vst, const YaUnitInfo::GetProgramListInfo&);
|
||||||
bool log_request(bool is_host_vst, const YaUnitInfo::GetProgramName&);
|
bool log_request(bool is_host_vst, const YaUnitInfo::GetProgramName&);
|
||||||
bool log_request(bool is_host_vst, const YaUnitInfo::GetProgramInfo&);
|
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,
|
bool log_request(bool is_host_vst,
|
||||||
const YaAudioProcessor::SetBusArrangements&);
|
const YaAudioProcessor::SetBusArrangements&);
|
||||||
|
|||||||
@@ -105,7 +105,8 @@ using ControlRequest = std::variant<Vst3PlugViewProxy::Destruct,
|
|||||||
YaUnitInfo::GetProgramListCount,
|
YaUnitInfo::GetProgramListCount,
|
||||||
YaUnitInfo::GetProgramListInfo,
|
YaUnitInfo::GetProgramListInfo,
|
||||||
YaUnitInfo::GetProgramName,
|
YaUnitInfo::GetProgramName,
|
||||||
YaUnitInfo::GetProgramInfo>;
|
YaUnitInfo::GetProgramInfo,
|
||||||
|
YaUnitInfo::HasProgramPitchNames>;
|
||||||
|
|
||||||
template <typename S>
|
template <typename S>
|
||||||
void serialize(S& s, ControlRequest& payload) {
|
void serialize(S& s, ControlRequest& payload) {
|
||||||
|
|||||||
@@ -254,6 +254,28 @@ class YaUnitInfo : public Steinberg::Vst::IUnitInfo {
|
|||||||
int32 programIndex,
|
int32 programIndex,
|
||||||
Steinberg::Vst::CString attributeId /*in*/,
|
Steinberg::Vst::CString attributeId /*in*/,
|
||||||
Steinberg::Vst::String128 attributeValue /*out*/) override = 0;
|
Steinberg::Vst::String128 attributeValue /*out*/) override = 0;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Message to pass through a call to
|
||||||
|
* `IUnitInfo::hasProgramPitchNames(list_id, program_index)` to the Wine
|
||||||
|
* plugin host.
|
||||||
|
*/
|
||||||
|
struct HasProgramPitchNames {
|
||||||
|
using Response = UniversalTResult;
|
||||||
|
|
||||||
|
native_size_t instance_id;
|
||||||
|
|
||||||
|
Steinberg::Vst::ProgramListID list_id;
|
||||||
|
int32 program_index;
|
||||||
|
|
||||||
|
template <typename S>
|
||||||
|
void serialize(S& s) {
|
||||||
|
s.value8b(instance_id);
|
||||||
|
s.value4b(list_id);
|
||||||
|
s.value4b(program_index);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
virtual tresult PLUGIN_API
|
virtual tresult PLUGIN_API
|
||||||
hasProgramPitchNames(Steinberg::Vst::ProgramListID listId,
|
hasProgramPitchNames(Steinberg::Vst::ProgramListID listId,
|
||||||
int32 programIndex) override = 0;
|
int32 programIndex) override = 0;
|
||||||
|
|||||||
@@ -512,9 +512,10 @@ tresult PLUGIN_API Vst3PluginProxyImpl::getProgramInfo(
|
|||||||
tresult PLUGIN_API
|
tresult PLUGIN_API
|
||||||
Vst3PluginProxyImpl::hasProgramPitchNames(Steinberg::Vst::ProgramListID listId,
|
Vst3PluginProxyImpl::hasProgramPitchNames(Steinberg::Vst::ProgramListID listId,
|
||||||
int32 programIndex) {
|
int32 programIndex) {
|
||||||
// TODO: Implement
|
return bridge.send_message(
|
||||||
bridge.logger.log("TODO: IUnitInfo::hasProgramPitchNames()");
|
YaUnitInfo::HasProgramPitchNames{.instance_id = instance_id(),
|
||||||
return Steinberg::kNotImplemented;
|
.list_id = listId,
|
||||||
|
.program_index = programIndex});
|
||||||
}
|
}
|
||||||
|
|
||||||
tresult PLUGIN_API Vst3PluginProxyImpl::getProgramPitchName(
|
tresult PLUGIN_API Vst3PluginProxyImpl::getProgramPitchName(
|
||||||
|
|||||||
@@ -621,6 +621,12 @@ void Vst3Bridge::run() {
|
|||||||
.attribute_value =
|
.attribute_value =
|
||||||
tchar_pointer_to_u16string(attribute_value)};
|
tchar_pointer_to_u16string(attribute_value)};
|
||||||
},
|
},
|
||||||
|
[&](const YaUnitInfo::HasProgramPitchNames& request)
|
||||||
|
-> YaUnitInfo::HasProgramPitchNames::Response {
|
||||||
|
return object_instances[request.instance_id]
|
||||||
|
.unit_info->hasProgramPitchNames(request.list_id,
|
||||||
|
request.program_index);
|
||||||
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user