Print the plugin type during initialisation

This commit is contained in:
Robbert van der Helm
2020-12-03 12:08:24 +01:00
parent c57fd67aa8
commit f845763af0
2 changed files with 10 additions and 3 deletions
+4 -3
View File
@@ -66,7 +66,7 @@ Vst2PluginBridge::Vst2PluginBridge(audioMasterCallback host_callback)
? std::unique_ptr<HostProcess>(std::make_unique<GroupHost>(
io_context,
logger,
HostRequest{.plugin_type = PluginType::vst2,
HostRequest{.plugin_type = plugin_type,
.plugin_path = vst_plugin_path.string(),
.endpoint_base_dir = sockets.base_dir.string()},
sockets,
@@ -75,7 +75,7 @@ Vst2PluginBridge::Vst2PluginBridge(audioMasterCallback host_callback)
io_context,
logger,
HostRequest{
.plugin_type = PluginType::vst2,
.plugin_type = plugin_type,
.plugin_path = vst_plugin_path.string(),
.endpoint_base_dir = sockets.base_dir.string()}))),
has_realtime_priority(set_realtime_priority()),
@@ -622,13 +622,14 @@ void Vst2PluginBridge::set_parameter(AEffect* /*plugin*/,
void Vst2PluginBridge::log_init_message() {
std::stringstream init_msg;
// TODO: This should also list the plugin type
init_msg << "Initializing yabridge version " << yabridge_git_version
<< std::endl;
init_msg << "host: '" << vst_host->path().string() << "'"
<< std::endl;
init_msg << "plugin: '" << vst_plugin_path.string() << "'"
<< std::endl;
init_msg << "plugin type: '" << plugin_type_to_string(plugin_type) << "'"
<< std::endl;
init_msg << "realtime: '" << (has_realtime_priority ? "yes" : "no")
<< "'" << std::endl;
init_msg << "sockets: '" << sockets.base_dir.string() << "'"
+6
View File
@@ -50,6 +50,12 @@ class Vst2PluginBridge {
*/
Vst2PluginBridge(audioMasterCallback host_callback);
/**
* The type of the plugin we're dealing with. Passed to the host process and
* printed in the initialisation message.
*/
static constexpr PluginType plugin_type = PluginType::vst2;
// The four below functions are the handlers from the VST2 API. They are
// called through proxy functions in `plugin.cpp`.