mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-09 20:29:10 +02:00
Log process context contents in IInfoListener::setChannelContextInfos
This commit is contained in:
@@ -382,10 +382,19 @@ bool Vst3Logger::log_request(
|
|||||||
bool is_host_vst,
|
bool is_host_vst,
|
||||||
const YaInfoListener::SetChannelContextInfos& request) {
|
const YaInfoListener::SetChannelContextInfos& request) {
|
||||||
return log_request_base(is_host_vst, [&](auto& message) {
|
return log_request_base(is_host_vst, [&](auto& message) {
|
||||||
// TODO: Log the keys for the values provided by the host
|
|
||||||
message << request.instance_id
|
message << request.instance_id
|
||||||
<< ": IInfoListener::setChannelContextInfos(list = "
|
<< ": IInfoListener::setChannelContextInfos(list = "
|
||||||
"<IAttributeList*>)";
|
"<IAttributeList* containing [";
|
||||||
|
for (bool first = true;
|
||||||
|
const auto& key_type : request.list.keys_and_types()) {
|
||||||
|
if (!first) {
|
||||||
|
message << ", ";
|
||||||
|
}
|
||||||
|
|
||||||
|
message << key_type;
|
||||||
|
first = false;
|
||||||
|
}
|
||||||
|
message << "]>)";
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -89,6 +89,24 @@ IMPLEMENT_FUNKNOWN_METHODS(YaAttributeList,
|
|||||||
Steinberg::Vst::IAttributeList::iid)
|
Steinberg::Vst::IAttributeList::iid)
|
||||||
#pragma GCC diagnostic pop
|
#pragma GCC diagnostic pop
|
||||||
|
|
||||||
|
std::vector<std::string> YaAttributeList::keys_and_types() const {
|
||||||
|
std::vector<std::string> result{};
|
||||||
|
for (const auto& [key, value] : attrs_int) {
|
||||||
|
result.push_back("\"" + key + "\" (int)");
|
||||||
|
}
|
||||||
|
for (const auto& [key, value] : attrs_float) {
|
||||||
|
result.push_back("\"" + key + "\" (float)");
|
||||||
|
}
|
||||||
|
for (const auto& [key, value] : attrs_string) {
|
||||||
|
result.push_back("\"" + key + "\" (string)");
|
||||||
|
}
|
||||||
|
for (const auto& [key, value] : attrs_binary) {
|
||||||
|
result.push_back("\"" + key + "\" (binary)");
|
||||||
|
}
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
tresult YaAttributeList::write_back(
|
tresult YaAttributeList::write_back(
|
||||||
Steinberg::Vst::IAttributeList* stream) const {
|
Steinberg::Vst::IAttributeList* stream) const {
|
||||||
if (!stream) {
|
if (!stream) {
|
||||||
|
|||||||
@@ -42,6 +42,12 @@ class YaAttributeList : public Steinberg::Vst::IAttributeList {
|
|||||||
|
|
||||||
DECLARE_FUNKNOWN_METHODS
|
DECLARE_FUNKNOWN_METHODS
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get all of the keys stored in this attribute list along with their type
|
||||||
|
* in the `<key> (<type>)` format, used in the log messages.
|
||||||
|
*/
|
||||||
|
std::vector<std::string> keys_and_types() const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Write the attribute list a host provided `IAttributeList`. This is used
|
* Write the attribute list a host provided `IAttributeList`. This is used
|
||||||
* in `YaBStream::write_back` to write any preset meta data back to the host
|
* in `YaBStream::write_back` to write any preset meta data back to the host
|
||||||
|
|||||||
Reference in New Issue
Block a user