mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-07 20:10:13 +02:00
Rename architecture related functions and structs
This commit is contained in:
@@ -656,7 +656,7 @@ void Vst2PluginBridge::log_init_message() {
|
||||
} else {
|
||||
init_msg << "individually";
|
||||
}
|
||||
if (vst_host->architecture() == PluginArchitecture::vst_32) {
|
||||
if (vst_host->architecture() == LibArchitecture::dll_32) {
|
||||
init_msg << ", 32-bit";
|
||||
} else {
|
||||
init_msg << ", 64-bit";
|
||||
|
||||
@@ -89,7 +89,7 @@ IndividualHost::IndividualHost(boost::asio::io_context& io_context,
|
||||
fs::path plugin_path,
|
||||
const Sockets& sockets)
|
||||
: HostProcess(io_context, logger),
|
||||
plugin_arch(find_vst_architecture(plugin_path)),
|
||||
plugin_arch(find_dll_architecture(plugin_path)),
|
||||
host_path(find_vst_host(plugin_arch, false)),
|
||||
host(launch_host(host_path,
|
||||
#ifdef WITH_WINEDBG
|
||||
@@ -114,7 +114,7 @@ IndividualHost::IndividualHost(boost::asio::io_context& io_context,
|
||||
#endif
|
||||
}
|
||||
|
||||
PluginArchitecture IndividualHost::architecture() {
|
||||
LibArchitecture IndividualHost::architecture() {
|
||||
return plugin_arch;
|
||||
}
|
||||
|
||||
@@ -137,7 +137,7 @@ GroupHost::GroupHost(boost::asio::io_context& io_context,
|
||||
Sockets& sockets,
|
||||
std::string group_name)
|
||||
: HostProcess(io_context, logger),
|
||||
plugin_arch(find_vst_architecture(plugin_path)),
|
||||
plugin_arch(find_dll_architecture(plugin_path)),
|
||||
host_path(find_vst_host(plugin_arch, true)),
|
||||
sockets(sockets) {
|
||||
#ifdef WITH_WINEDBG
|
||||
@@ -233,7 +233,7 @@ GroupHost::GroupHost(boost::asio::io_context& io_context,
|
||||
}
|
||||
}
|
||||
|
||||
PluginArchitecture GroupHost::architecture() {
|
||||
LibArchitecture GroupHost::architecture() {
|
||||
return plugin_arch;
|
||||
}
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ class HostProcess {
|
||||
* Return the architecture of the plugin we are loading, i.e. whether it is
|
||||
* 32-bit or 64-bit.
|
||||
*/
|
||||
virtual PluginArchitecture architecture() = 0;
|
||||
virtual LibArchitecture architecture() = 0;
|
||||
|
||||
/**
|
||||
* Return the full path to the host application in use. The host application
|
||||
@@ -130,13 +130,13 @@ class IndividualHost : public HostProcess {
|
||||
boost::filesystem::path plugin_path,
|
||||
const Sockets& sockets);
|
||||
|
||||
PluginArchitecture architecture() override;
|
||||
LibArchitecture architecture() override;
|
||||
boost::filesystem::path path() override;
|
||||
bool running() override;
|
||||
void terminate() override;
|
||||
|
||||
private:
|
||||
PluginArchitecture plugin_arch;
|
||||
LibArchitecture plugin_arch;
|
||||
boost::filesystem::path host_path;
|
||||
boost::process::child host;
|
||||
};
|
||||
@@ -173,13 +173,13 @@ class GroupHost : public HostProcess {
|
||||
Sockets& socket_endpoint,
|
||||
std::string group_name);
|
||||
|
||||
PluginArchitecture architecture() override;
|
||||
LibArchitecture architecture() override;
|
||||
boost::filesystem::path path() override;
|
||||
bool running() override;
|
||||
void terminate() override;
|
||||
|
||||
private:
|
||||
PluginArchitecture plugin_arch;
|
||||
LibArchitecture plugin_arch;
|
||||
boost::filesystem::path host_path;
|
||||
|
||||
/**
|
||||
|
||||
@@ -54,10 +54,10 @@ std::optional<fs::path> find_wineprefix() {
|
||||
return dosdevices_dir->parent_path();
|
||||
}
|
||||
|
||||
fs::path find_vst_host(PluginArchitecture plugin_arch, bool use_plugin_groups) {
|
||||
fs::path find_vst_host(LibArchitecture plugin_arch, bool use_plugin_groups) {
|
||||
auto host_name = use_plugin_groups ? yabridge_group_host_name
|
||||
: yabridge_individual_host_name;
|
||||
if (plugin_arch == PluginArchitecture::vst_32) {
|
||||
if (plugin_arch == LibArchitecture::dll_32) {
|
||||
host_name = use_plugin_groups ? yabridge_group_host_name_32bit
|
||||
: yabridge_individual_host_name_32bit;
|
||||
}
|
||||
@@ -110,17 +110,17 @@ fs::path find_vst_plugin() {
|
||||
boost::filesystem::path generate_group_endpoint(
|
||||
const std::string& group_name,
|
||||
const boost::filesystem::path& wine_prefix,
|
||||
const PluginArchitecture architecture) {
|
||||
const LibArchitecture architecture) {
|
||||
std::ostringstream socket_name;
|
||||
socket_name << "yabridge-group-" << group_name << "-"
|
||||
<< std::to_string(
|
||||
std::hash<std::string>{}(wine_prefix.string()))
|
||||
<< "-";
|
||||
switch (architecture) {
|
||||
case PluginArchitecture::vst_32:
|
||||
case LibArchitecture::dll_32:
|
||||
socket_name << "x32";
|
||||
break;
|
||||
case PluginArchitecture::vst_64:
|
||||
case LibArchitecture::dll_64:
|
||||
socket_name << "x64";
|
||||
break;
|
||||
}
|
||||
|
||||
+2
-2
@@ -71,7 +71,7 @@ std::string create_logger_prefix(
|
||||
* @return The a path to the VST host, if found.
|
||||
* @throw std::runtime_error If the Wine VST host could not be found.
|
||||
*/
|
||||
boost::filesystem::path find_vst_host(PluginArchitecture plugin_arch,
|
||||
boost::filesystem::path find_vst_host(LibArchitecture plugin_arch,
|
||||
bool use_plugin_groups);
|
||||
|
||||
/**
|
||||
@@ -125,7 +125,7 @@ std::optional<boost::filesystem::path> find_wineprefix();
|
||||
boost::filesystem::path generate_group_endpoint(
|
||||
const std::string& group_name,
|
||||
const boost::filesystem::path& wine_prefix,
|
||||
const PluginArchitecture architecture);
|
||||
const LibArchitecture architecture);
|
||||
|
||||
/**
|
||||
* Return the search path as defined in `$PATH`, with `~/.local/share/yabridge`
|
||||
|
||||
Reference in New Issue
Block a user