mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-10 04:30:12 +02:00
Rename 'Sockets' to 'Vst2Sockets'
This commit is contained in:
@@ -154,7 +154,7 @@ class SocketHandler {
|
|||||||
* connections will be accepted when `connect()` gets called. This should
|
* connections will be accepted when `connect()` gets called. This should
|
||||||
* be set to `true` on the plugin side, and `false` on the Wine host side.
|
* be set to `true` on the plugin side, and `false` on the Wine host side.
|
||||||
*
|
*
|
||||||
* @see Sockets::connect
|
* @see Vst2Sockets::connect
|
||||||
*/
|
*/
|
||||||
SocketHandler(boost::asio::io_context& io_context,
|
SocketHandler(boost::asio::io_context& io_context,
|
||||||
boost::asio::local::stream_protocol::endpoint endpoint,
|
boost::asio::local::stream_protocol::endpoint endpoint,
|
||||||
|
|||||||
@@ -93,7 +93,7 @@ class DefaultDataConverter {
|
|||||||
* slightly differently:
|
* slightly differently:
|
||||||
*
|
*
|
||||||
* - We'll keep a single long lived socket connection. This works the exact same
|
* - We'll keep a single long lived socket connection. This works the exact same
|
||||||
* way as every other socket defined in the `Sockets` class.
|
* way as every other socket defined in the `Vst2Sockets` class.
|
||||||
* - Aside from that the listening side will have a second thread asynchronously
|
* - Aside from that the listening side will have a second thread asynchronously
|
||||||
* listening for new connections on the socket endpoint.
|
* listening for new connections on the socket endpoint.
|
||||||
*
|
*
|
||||||
@@ -124,7 +124,7 @@ class EventHandler {
|
|||||||
* connections will be accepted when `connect()` gets called. This should
|
* connections will be accepted when `connect()` gets called. This should
|
||||||
* be set to `true` on the plugin side, and `false` on the Wine host side.
|
* be set to `true` on the plugin side, and `false` on the Wine host side.
|
||||||
*
|
*
|
||||||
* @see Sockets::connect
|
* @see Vst2Sockets::connect
|
||||||
*/
|
*/
|
||||||
EventHandler(boost::asio::io_context& io_context,
|
EventHandler(boost::asio::io_context& io_context,
|
||||||
boost::asio::local::stream_protocol::endpoint endpoint,
|
boost::asio::local::stream_protocol::endpoint endpoint,
|
||||||
@@ -448,7 +448,7 @@ class EventHandler {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* This acceptor will be used once synchronously on the listening side
|
* This acceptor will be used once synchronously on the listening side
|
||||||
* during `Sockets::connect()`. When `EventHandler::receive_events()` is
|
* during `Vst2Sockets::connect()`. When `EventHandler::receive_events()` is
|
||||||
* then called, we'll recreate the acceptor to asynchronously listen for new
|
* then called, we'll recreate the acceptor to asynchronously listen for new
|
||||||
* incoming socket connections on `endpoint` using. This is important,
|
* incoming socket connections on `endpoint` using. This is important,
|
||||||
* because on the case of `vst_host_callback` the acceptor is first accepts
|
* because on the case of `vst_host_callback` the acceptor is first accepts
|
||||||
@@ -480,7 +480,7 @@ class EventHandler {
|
|||||||
* should be `std::jthread` and on the Wine side this should be `Win32Thread`.
|
* should be `std::jthread` and on the Wine side this should be `Win32Thread`.
|
||||||
*/
|
*/
|
||||||
template <typename Thread>
|
template <typename Thread>
|
||||||
class Sockets {
|
class Vst2Sockets {
|
||||||
public:
|
public:
|
||||||
/**
|
/**
|
||||||
* Sets up the sockets using the specified base directory. The sockets won't
|
* Sets up the sockets using the specified base directory. The sockets won't
|
||||||
@@ -494,9 +494,9 @@ class Sockets {
|
|||||||
* connections will be accepted when `connect()` gets called. This should
|
* connections will be accepted when `connect()` gets called. This should
|
||||||
* be set to `true` on the plugin side, and `false` on the Wine host side.
|
* be set to `true` on the plugin side, and `false` on the Wine host side.
|
||||||
*
|
*
|
||||||
* @see Sockets::connect
|
* @see Vst2Sockets::connect
|
||||||
*/
|
*/
|
||||||
Sockets(boost::asio::io_context& io_context,
|
Vst2Sockets(boost::asio::io_context& io_context,
|
||||||
const boost::filesystem::path& endpoint_base_dir,
|
const boost::filesystem::path& endpoint_base_dir,
|
||||||
bool listen)
|
bool listen)
|
||||||
: base_dir(endpoint_base_dir),
|
: base_dir(endpoint_base_dir),
|
||||||
@@ -521,7 +521,7 @@ class Sockets {
|
|||||||
* Cleans up the directory containing the socket endpoints when yabridge
|
* Cleans up the directory containing the socket endpoints when yabridge
|
||||||
* shuts down if it still exists.
|
* shuts down if it still exists.
|
||||||
*/
|
*/
|
||||||
~Sockets() {
|
~Vst2Sockets() {
|
||||||
// Manually close all sockets so we break out of any blocking operations
|
// Manually close all sockets so we break out of any blocking operations
|
||||||
// that may still be active
|
// that may still be active
|
||||||
host_vst_dispatch.close();
|
host_vst_dispatch.close();
|
||||||
|
|||||||
@@ -145,7 +145,7 @@ class Vst2PluginBridge {
|
|||||||
void log_init_message();
|
void log_init_message();
|
||||||
|
|
||||||
boost::asio::io_context io_context;
|
boost::asio::io_context io_context;
|
||||||
Sockets<std::jthread> sockets;
|
Vst2Sockets<std::jthread> sockets;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The thread that handles host callbacks.
|
* The thread that handles host callbacks.
|
||||||
|
|||||||
@@ -87,7 +87,7 @@ void HostProcess::async_log_pipe_lines(patched_async_pipe& pipe,
|
|||||||
IndividualHost::IndividualHost(boost::asio::io_context& io_context,
|
IndividualHost::IndividualHost(boost::asio::io_context& io_context,
|
||||||
Logger& logger,
|
Logger& logger,
|
||||||
fs::path plugin_path,
|
fs::path plugin_path,
|
||||||
const Sockets<std::jthread>& sockets)
|
const Vst2Sockets<std::jthread>& sockets)
|
||||||
: HostProcess(io_context, logger),
|
: HostProcess(io_context, logger),
|
||||||
plugin_arch(find_vst_architecture(plugin_path)),
|
plugin_arch(find_vst_architecture(plugin_path)),
|
||||||
host_path(find_vst_host(plugin_arch, false)),
|
host_path(find_vst_host(plugin_arch, false)),
|
||||||
@@ -134,7 +134,7 @@ void IndividualHost::terminate() {
|
|||||||
GroupHost::GroupHost(boost::asio::io_context& io_context,
|
GroupHost::GroupHost(boost::asio::io_context& io_context,
|
||||||
Logger& logger,
|
Logger& logger,
|
||||||
fs::path plugin_path,
|
fs::path plugin_path,
|
||||||
Sockets<std::jthread>& sockets,
|
Vst2Sockets<std::jthread>& sockets,
|
||||||
std::string group_name)
|
std::string group_name)
|
||||||
: HostProcess(io_context, logger),
|
: HostProcess(io_context, logger),
|
||||||
plugin_arch(find_vst_architecture(plugin_path)),
|
plugin_arch(find_vst_architecture(plugin_path)),
|
||||||
|
|||||||
@@ -130,7 +130,7 @@ class IndividualHost : public HostProcess {
|
|||||||
IndividualHost(boost::asio::io_context& io_context,
|
IndividualHost(boost::asio::io_context& io_context,
|
||||||
Logger& logger,
|
Logger& logger,
|
||||||
boost::filesystem::path plugin_path,
|
boost::filesystem::path plugin_path,
|
||||||
const Sockets<std::jthread>& sockets);
|
const Vst2Sockets<std::jthread>& sockets);
|
||||||
|
|
||||||
PluginArchitecture architecture() override;
|
PluginArchitecture architecture() override;
|
||||||
boost::filesystem::path path() override;
|
boost::filesystem::path path() override;
|
||||||
@@ -172,7 +172,7 @@ class GroupHost : public HostProcess {
|
|||||||
GroupHost(boost::asio::io_context& io_context,
|
GroupHost(boost::asio::io_context& io_context,
|
||||||
Logger& logger,
|
Logger& logger,
|
||||||
boost::filesystem::path plugin_path,
|
boost::filesystem::path plugin_path,
|
||||||
Sockets<std::jthread>& socket_endpoint,
|
Vst2Sockets<std::jthread>& socket_endpoint,
|
||||||
std::string group_name);
|
std::string group_name);
|
||||||
|
|
||||||
PluginArchitecture architecture() override;
|
PluginArchitecture architecture() override;
|
||||||
@@ -206,7 +206,7 @@ class GroupHost : public HostProcess {
|
|||||||
* The associated sockets for the plugin we're hosting. This is used to
|
* The associated sockets for the plugin we're hosting. This is used to
|
||||||
* terminate the plugin.
|
* terminate the plugin.
|
||||||
*/
|
*/
|
||||||
Sockets<std::jthread>& sockets;
|
Vst2Sockets<std::jthread>& sockets;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A thread that waits for the group host to have started and then ask it to
|
* A thread that waits for the group host to have started and then ask it to
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ class Vst2Bridge {
|
|||||||
* @param plugin_dll_path A (Unix style) path to the VST plugin .dll file to
|
* @param plugin_dll_path A (Unix style) path to the VST plugin .dll file to
|
||||||
* load.
|
* load.
|
||||||
* @param endpoint_base_dir The base directory used for the socket
|
* @param endpoint_base_dir The base directory used for the socket
|
||||||
* endpoints. See `Sockets` for more information.
|
* endpoints. See `Vst2Sockets` for more information.
|
||||||
*
|
*
|
||||||
* @note The object has to be constructed from the same thread that calls
|
* @note The object has to be constructed from the same thread that calls
|
||||||
* `main_context.run()`.
|
* `main_context.run()`.
|
||||||
@@ -189,7 +189,7 @@ class Vst2Bridge {
|
|||||||
* sockets will be closed first, and we can then safely wait for the
|
* sockets will be closed first, and we can then safely wait for the
|
||||||
* threads to exit.
|
* threads to exit.
|
||||||
*/
|
*/
|
||||||
Sockets<Win32Thread> sockets;
|
Vst2Sockets<Win32Thread> sockets;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The MIDI events that have been received **and processed** since the last
|
* The MIDI events that have been received **and processed** since the last
|
||||||
|
|||||||
Reference in New Issue
Block a user