mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-14 12:30:00 +02:00
Listen on the group socket and handle requests
This commit is contained in:
@@ -108,3 +108,7 @@ AEffect& update_aeffect(AEffect& plugin, const AEffect& updated_plugin) {
|
||||
|
||||
return plugin;
|
||||
}
|
||||
|
||||
bool PluginParameters::operator==(const PluginParameters& rhs) const {
|
||||
return plugin_path == rhs.plugin_path && socket_path == rhs.socket_path;
|
||||
}
|
||||
|
||||
@@ -571,3 +571,30 @@ struct AudioBuffers {
|
||||
s.value4b(sample_frames);
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* An object containing the startup options for hosting a plugin in a plugin
|
||||
* group process. These are the exact same options that would have been passed
|
||||
* to `yabridge-host.exe` were the plugin to be hosted individually.
|
||||
*/
|
||||
struct PluginParameters {
|
||||
std::string plugin_path;
|
||||
std::string socket_path;
|
||||
|
||||
bool operator==(const PluginParameters& rhs) const;
|
||||
|
||||
template <typename S>
|
||||
void serialize(S& s) {
|
||||
s.text1b(plugin_path, 4096);
|
||||
s.text1b(socket_path, 4096);
|
||||
}
|
||||
};
|
||||
|
||||
template <>
|
||||
struct std::hash<PluginParameters> {
|
||||
std::size_t operator()(PluginParameters const& params) const noexcept {
|
||||
std::hash<string> hasher{};
|
||||
|
||||
return hasher(params.plugin_path) ^ (hasher(params.socket_path) << 1);
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user