mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-06 19:40:10 +02:00
Add logging for audio ports messages
This commit is contained in:
@@ -107,6 +107,26 @@ bool ClapLogger::log_request(bool is_host_plugin,
|
||||
});
|
||||
}
|
||||
|
||||
bool ClapLogger::log_request(
|
||||
bool is_host_plugin,
|
||||
const clap::ext::audio_ports::plugin::Count& request) {
|
||||
return log_request_base(is_host_plugin, [&](auto& message) {
|
||||
message << request.instance_id
|
||||
<< ": clap_plugin_audio_ports::count(is_input = "
|
||||
<< request.is_input << ")";
|
||||
});
|
||||
}
|
||||
|
||||
bool ClapLogger::log_request(
|
||||
bool is_host_plugin,
|
||||
const clap::ext::audio_ports::plugin::Get& request) {
|
||||
return log_request_base(is_host_plugin, [&](auto& message) {
|
||||
message << request.instance_id
|
||||
<< ": clap_plugin_audio_ports::get(index = " << request.index
|
||||
<< "is_input = " << request.is_input << ", *info)";
|
||||
});
|
||||
}
|
||||
|
||||
bool ClapLogger::log_request(bool is_host_plugin,
|
||||
const clap::plugin::StartProcessing& request) {
|
||||
return log_request_base(is_host_plugin, [&](auto& message) {
|
||||
@@ -150,6 +170,26 @@ bool ClapLogger::log_request(bool is_host_plugin,
|
||||
});
|
||||
}
|
||||
|
||||
bool ClapLogger::log_request(
|
||||
bool is_host_plugin,
|
||||
const clap::ext::audio_ports::host::IsRescanFlagSupported& request) {
|
||||
return log_request_base(is_host_plugin, [&](auto& message) {
|
||||
message << request.owner_instance_id
|
||||
<< ": clap_host_audio_ports::is_rescan_flag_supported(flag = "
|
||||
<< std::bitset<sizeof(request.flag) * 8>(request.flag) << ")";
|
||||
});
|
||||
}
|
||||
|
||||
bool ClapLogger::log_request(
|
||||
bool is_host_plugin,
|
||||
const clap::ext::audio_ports::host::Rescan& request) {
|
||||
return log_request_base(is_host_plugin, [&](auto& message) {
|
||||
message << request.owner_instance_id
|
||||
<< ": clap_host_audio_ports::rescan(flag = "
|
||||
<< std::bitset<sizeof(request.flags) * 8>(request.flags) << ")";
|
||||
});
|
||||
}
|
||||
|
||||
void ClapLogger::log_response(bool is_host_plugin, const Ack&) {
|
||||
log_response_base(is_host_plugin, [&](auto& message) { message << "ACK"; });
|
||||
}
|
||||
@@ -222,6 +262,19 @@ void ClapLogger::log_response(bool is_host_plugin,
|
||||
});
|
||||
}
|
||||
|
||||
void ClapLogger::log_response(
|
||||
bool is_host_plugin,
|
||||
const clap::ext::audio_ports::plugin::GetResponse& response) {
|
||||
return log_response_base(is_host_plugin, [&](auto& message) {
|
||||
if (response.result) {
|
||||
message << "true, <audio_port_info_t* for \""
|
||||
<< response.result->name << "\">";
|
||||
} else {
|
||||
message << "false";
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
void ClapLogger::log_response(bool is_host_plugin, const Configuration&) {
|
||||
log_response_base(is_host_plugin,
|
||||
[&](auto& message) { message << "<Configuration>"; });
|
||||
|
||||
@@ -62,6 +62,10 @@ class ClapLogger {
|
||||
bool log_request(bool is_host_plugin, const clap::plugin::Destroy&);
|
||||
bool log_request(bool is_host_plugin, const clap::plugin::Activate&);
|
||||
bool log_request(bool is_host_plugin, const clap::plugin::Deactivate&);
|
||||
bool log_request(bool is_host_plugin,
|
||||
const clap::ext::audio_ports::plugin::Count&);
|
||||
bool log_request(bool is_host_plugin,
|
||||
const clap::ext::audio_ports::plugin::Get&);
|
||||
|
||||
bool log_request(bool is_host_plugin, const clap::plugin::StartProcessing&);
|
||||
bool log_request(bool is_host_plugin, const clap::plugin::StopProcessing&);
|
||||
@@ -70,6 +74,11 @@ class ClapLogger {
|
||||
bool log_request(bool is_host_plugin, const WantsConfiguration&);
|
||||
bool log_request(bool is_host_plugin, const clap::host::RequestRestart&);
|
||||
bool log_request(bool is_host_plugin, const clap::host::RequestProcess&);
|
||||
bool log_request(
|
||||
bool is_host_plugin,
|
||||
const clap::ext::audio_ports::host::IsRescanFlagSupported&);
|
||||
bool log_request(bool is_host_plugin,
|
||||
const clap::ext::audio_ports::host::Rescan&);
|
||||
|
||||
void log_response(bool is_host_plugin, const Ack&);
|
||||
void log_response(bool is_host_plugin,
|
||||
@@ -79,10 +88,8 @@ class ClapLogger {
|
||||
void log_response(bool is_host_plugin, const clap::plugin::InitResponse&);
|
||||
void log_response(bool is_host_plugin,
|
||||
const clap::plugin::ActivateResponse&);
|
||||
|
||||
// TODO: Audio thread responses
|
||||
// void log_response(bool is_host_plugin,
|
||||
// const YaAudioProcessor::GetBusArrangementResponse&);
|
||||
void log_response(bool is_host_plugin,
|
||||
const clap::ext::audio_ports::plugin::GetResponse&);
|
||||
|
||||
void log_response(bool is_host_plugin, const Configuration&);
|
||||
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
|
||||
#include "../bitsery/ext/message-reference.h"
|
||||
#include "../utils.h"
|
||||
#include "clap/ext/audio-ports.h"
|
||||
#include "clap/host.h"
|
||||
#include "clap/plugin-factory.h"
|
||||
#include "common.h"
|
||||
|
||||
Reference in New Issue
Block a user