Implement Wine side for creating plugin instances

This commit is contained in:
Robbert van der Helm
2022-09-08 00:11:04 +02:00
parent e74c25445d
commit 423534f373
6 changed files with 113 additions and 26 deletions
+24 -2
View File
@@ -29,6 +29,15 @@ bool ClapLogger::log_request(bool is_host_plugin,
});
}
bool ClapLogger::log_request(bool is_host_plugin,
const clap::plugin_factory::Create& request) {
return log_request_base(is_host_plugin, [&](auto& message) {
message << "clap_plugin_factory::create(host = <clap_host_t*>, "
"plugin_id = \""
<< request.plugin_id << "\")";
});
}
bool ClapLogger::log_request(bool is_host_plugin, const WantsConfiguration&) {
return log_request_base(is_host_plugin, [&](auto& message) {
message << "Requesting <Configuration>";
@@ -40,10 +49,10 @@ bool ClapLogger::log_request(bool is_host_plugin, const WantsConfiguration&) {
// });
// }
bool ClapLogger::log_response(
void ClapLogger::log_response(
bool is_host_plugin,
const clap::plugin_factory::ListResponse& response) {
return log_request_base(is_host_plugin, [&](auto& message) {
return log_response_base(is_host_plugin, [&](auto& message) {
if (response.descriptors) {
message << "<clap_plugin_factory containing "
<< response.descriptors->size() << " plugin descriptors>";
@@ -53,6 +62,19 @@ bool ClapLogger::log_response(
});
}
void ClapLogger::log_response(
bool is_host_plugin,
const clap::plugin_factory::CreateResponse& response) {
return log_response_base(is_host_plugin, [&](auto& message) {
if (response.instance_id) {
message << "<clap_plugin_t* with instance ID "
<< *response.instance_id << ">";
} else {
message << "<nullptr*>";
}
});
}
void ClapLogger::log_response(bool is_host_plugin, const Configuration&) {
log_response_base(is_host_plugin,
[&](auto& message) { message << "<Configuration>"; });
+4 -1
View File
@@ -46,6 +46,7 @@ class ClapLogger {
// log message for the response together with the request.
bool log_request(bool is_host_plugin, const clap::plugin_factory::List&);
bool log_request(bool is_host_plugin, const clap::plugin_factory::Create&);
// TODO: Audio thread requests
// bool log_request(bool is_host_plugin,
@@ -54,8 +55,10 @@ class ClapLogger {
bool log_request(bool is_host_plugin, const WantsConfiguration&);
// void log_response(bool is_host_plugin, const Ack&);
bool log_response(bool is_host_plugin,
void log_response(bool is_host_plugin,
const clap::plugin_factory::ListResponse&);
void log_response(bool is_host_plugin,
const clap::plugin_factory::CreateResponse&);
// TODO: Audio thread responses
// void log_response(bool is_host_plugin,