Add logging for INoteExpressionPhysicalUIMapping

This commit is contained in:
Robbert van der Helm
2021-01-15 19:17:42 +01:00
parent f50ed52073
commit cc35e89252
3 changed files with 51 additions and 1 deletions
+45
View File
@@ -466,6 +466,31 @@ bool Vst3Logger::log_request(
});
}
bool Vst3Logger::log_request(
bool is_host_vst,
const YaNoteExpressionPhysicalUIMapping::GetNotePhysicalUIMapping&
request) {
return log_request_base(is_host_vst, [&](auto& message) {
message << request.instance_id
<< ": "
"INoteExpressionPhysicalUIMapping::getNotePhysicalUIMapping("
"busIndex = "
<< request.bus_index << ", channel = " << request.channel
<< ", list = ";
for (bool first = true; const auto& mapping : request.list.maps) {
if (!first) {
message << ", ";
}
// The host provides the physical UI elements, and the plugin should
// fill in a note expression ID for each of them.
message << mapping.physicalUITypeID << " => ?";
first = false;
}
message << ")";
});
}
bool Vst3Logger::log_request(bool is_host_vst,
const YaParameterFinder::FindParameter& request) {
return log_request_base(is_host_vst, [&](auto& message) {
@@ -1396,6 +1421,26 @@ void Vst3Logger::log_response(
});
}
void Vst3Logger::log_response(
bool is_host_vst,
const YaNoteExpressionPhysicalUIMapping::GetNotePhysicalUIMappingResponse&
response) {
log_response_base(is_host_vst, [&](auto& message) {
message << response.result.string();
if (response.result == Steinberg::kResultOk) {
message << ", [";
for (bool first = true; const auto& mapping : response.list.maps) {
if (!first) {
message << ", ";
}
message << mapping.physicalUITypeID << " => "
<< mapping.noteExpressionTypeID;
first = false;
}
}
});
}
void Vst3Logger::log_response(
bool is_host_vst,
const YaParameterFinder::FindParameterResponse& response) {
+6
View File
@@ -122,6 +122,9 @@ class Vst3Logger {
bool log_request(
bool is_host_vst,
const YaNoteExpressionController::GetNoteExpressionValueByString&);
bool log_request(
bool is_host_vst,
const YaNoteExpressionPhysicalUIMapping::GetNotePhysicalUIMapping&);
bool log_request(bool is_host_vst, const YaParameterFinder::FindParameter&);
bool log_request(bool is_host_vst,
const YaPlugView::IsPlatformTypeSupported&);
@@ -252,6 +255,9 @@ class Vst3Logger {
void log_response(bool is_host_vst,
const YaNoteExpressionController::
GetNoteExpressionValueByStringResponse&);
void log_response(bool is_host_vst,
const YaNoteExpressionPhysicalUIMapping::
GetNotePhysicalUIMappingResponse&);
void log_response(bool is_host_vst,
const YaParameterFinder::FindParameterResponse&);
void log_response(bool is_host_vst, const YaPlugView::GetSizeResponse&);
@@ -46,7 +46,6 @@ class YaPhysicalUIMapList {
s.container(maps, 1 << 31);
}
private:
std::vector<Steinberg::Vst::PhysicalUIMap> maps;
};