Robbert van der Helm
3a9d902c72
Allow all threads to return when sockets close
...
This was not a problem with individually hosted plugins because the
entire process got terminated at once, but here we all threads to shut
down gracefully when a plugin's sockets get closed. I wish this wouldn't
need all these try-catches, but we're not writing Haskell here.
The only issue remaining is that for some reason only the first
instance's editor works, at least for Serum. This might be because of
the message loop.
2020-05-22 23:22:49 +02:00
Robbert van der Helm
a246ddf344
Manually close sockets when not killing process
...
Killing the socket would otherwise cause the sockets to be closed, and
both sides to shut down.
2020-05-22 23:08:25 +02:00
Robbert van der Helm
6da1909d4b
Fix interleaved group host initialization
...
In case two yabridge instances start at the same time and both try to
launch a group host for the same group and the second plugin connects to
the first group host, then we should of course be using that process'es
PID to check if the group host is still running.
2020-05-22 22:50:29 +02:00
Robbert van der Helm
bea924c0e1
Make plugin initialization thread safe
2020-05-22 22:42:24 +02:00
Robbert van der Helm
b4b471523f
Fix assertion in group host connection handler
2020-05-22 20:15:53 +02:00
Robbert van der Helm
ad6199949d
Fix startup errors not being logged
2020-05-22 20:15:53 +02:00
Robbert van der Helm
c5c1c334d9
Add group host support to the plugin
...
The difference between individual hosting and group hosting will have to
be encapsulated in a class to keep the rest of the plugin bridge clean.
2020-05-22 20:15:53 +02:00
Robbert van der Helm
903d977d83
Add a function for generating group host endpoints
2020-05-22 19:06:43 +02:00
Robbert van der Helm
9fb7f1fc03
Add handling for stale and active group sockets
2020-05-22 19:06:43 +02:00
Robbert van der Helm
5b4b62d7c4
Use pid_t instead of ints for PIDs
2020-05-22 19:06:43 +02:00
Robbert van der Helm
615d23e525
Clean up new host process launching
2020-05-22 19:06:43 +02:00
Robbert van der Helm
9b50bac179
Reply with the group process's PID after a request
2020-05-22 19:06:43 +02:00
Robbert van der Helm
dd843519ce
Rename PluginParameters to GroupReuqest
2020-05-22 19:06:43 +02:00
Robbert van der Helm
27af0f8c11
Search for the group host when using plugin groups
2020-05-22 19:06:43 +02:00
Robbert van der Helm
fea256655d
Move process launching to a function
...
Starting and connecting to plugin group host processes is not going to
work in the intializer list.
2020-05-22 19:06:43 +02:00
Robbert van der Helm
91b0ebf38b
Remove mention of plugin groups flag
...
Since there's no reason for this to be behind a flag.
2020-05-21 17:15:24 +02:00
Robbert van der Helm
8c22f37f29
Actually host plugins in the group process
2020-05-21 17:12:55 +02:00
Robbert van der Helm
17cff5722e
Lock the active plugins map early
...
To prevent a race condition when an exiting plugin wants to terminate
the process when it think there are no plugins left just as another
yabridge instance is connecting to the group socket.
2020-05-21 17:12:41 +02:00
Robbert van der Helm
8eb01cb519
Listen on the group socket and handle requests
2020-05-20 18:45:33 +02:00
Robbert van der Helm
6d6d928838
Move all plugin group handling boilerplate
2020-05-19 15:29:48 +02:00
Robbert van der Helm
daad6f2f00
Fix empty line spam in log file when Wine crashes
2020-05-19 12:27:32 +02:00
Robbert van der Helm
c2fceb6e4a
Add a thread safety warning to write_object()
2020-05-19 11:33:34 +02:00
Robbert van der Helm
3985e10319
Add search paths for 32-bit Boost on Fedora
...
This will also cause the 64-bit version of the library to be picked up
on any distro that's not based on Fedora, which may cause some confusing
problems.
Is there a right way to do this? Meson doesn't allow you to override the
library search path for part of the build, and it also can't
differentiate between 32-bit and 64-bit libraries by default.
2020-05-19 10:47:30 +02:00
Robbert van der Helm
b4838f8d18
Update the version yabridge has been tested with
2020-05-18 17:12:54 +02:00
Robbert van der Helm
8bd1dc8c50
Encapsulate the STDOUT/STDERR capturing
2020-05-18 16:15:07 +02:00
Robbert van der Helm
53acb1f78a
Move wine-bridge.h -> bridges/vst2.h
...
This way we can structure the group handling and a potential future VST3
bridge in the same way.
2020-05-18 16:15:07 +02:00
Robbert van der Helm
b8028b8e13
Remap STDOUT and STDERR in group process to log
...
This is not very pretty, but there's not really another way and I"m
surprised that it actually works.
2020-05-18 16:15:07 +02:00
Robbert van der Helm
0ad849a42f
Fall back to /dev/stderr instead of std::cerr
...
This allows us to remap STDIO internally in the group process.
2020-05-18 16:15:07 +02:00
Robbert van der Helm
df2c4c29a9
Fix search path for 32-bit Boost
2020-05-18 16:15:07 +02:00
Robbert van der Helm
4e80e23cc0
Revert "Don't link the winelibs with libboost_filesystem"
...
This reverts commit e728dbe5a2 .
`std::filesystem` is broken on wineg++, at least with Wine 5.8. Any path
operations will throw a `std::filesystem::__cxx11::filesystem_error`:
what(): filesystem error: Cannot convert character sequence: Invalid or incomplete multibyte or wide character
2020-05-18 16:15:07 +02:00
Robbert van der Helm
2f39650322
Remove last traces of Boost.Filesystem from host
...
Missed this in e728dbe5a2 .
2020-05-18 16:15:07 +02:00
Robbert van der Helm
994f3c9e38
Add a plugin group host application
2020-05-18 16:15:07 +02:00
Robbert van der Helm
95e716d229
Rename vst-host.cpp -> individual-host.cpp
2020-05-17 14:43:21 +02:00
Robbert van der Helm
a849927a08
Move initialization message to a function
...
It was starting to get a bit unwieldy.
2020-05-17 14:43:21 +02:00
Robbert van der Helm
d2cd608abb
Print the configuration on startup
2020-05-17 14:43:21 +02:00
Robbert van der Helm
312200f100
Make the 'this_line_location' hack more reliable
...
It shouldn't be done if it's not needed.
2020-05-17 14:43:21 +02:00
Robbert van der Helm
e76d4b474c
Rearrange fields in PluginBridge
2020-05-16 14:46:48 +02:00
Robbert van der Helm
d0fe1c930a
Mention tomlplusplus in the readme
2020-05-15 16:51:50 +02:00
Robbert van der Helm
a615a66cc5
Add the group configuration parser
...
As described in #15 .
2020-05-15 16:35:18 +02:00
Robbert van der Helm
f96c08775a
Use Boost.Filesystem for the configuration
...
I'd much rather just use std::filesystem, but since all of
Boost.Process, Boost.DLL Boost.Asio uses its own filesystem library we
need to use it anyways.
2020-05-15 16:35:18 +02:00
Robbert van der Helm
d9ff98de84
Move everything configuration related to plugin
...
If it's tied to the .so file rather than the .dll file it wouldn't make
any sense to use it directly from the Wine host.
2020-05-15 16:35:18 +02:00
Robbert van der Helm
6f148b97a4
Add a TOML parser dependency
2020-05-15 16:35:18 +02:00
Robbert van der Helm
9a82e82c87
Factor out directory finding from prefix detection
...
This will also be used to locate the `yabridge.tmol` configuration file.
2020-05-15 16:35:18 +02:00
Robbert van der Helm
e728dbe5a2
Don't link the winelibs with libboost_filesystem
...
It's not actually used anywhere.
2020-05-15 16:30:39 +02:00
Robbert van der Helm
a69ecd22ed
Bump version in meson.build
...
I forgot to do this, but it's not used anywhere except when building
from a source tarball.
2020-05-14 18:32:06 +02:00
Robbert van der Helm
1fe38bcce6
Mention that SysEx is not implemented
...
Are there any plugins or hosts that use this?
2020-05-13 15:00:18 +02:00
Robbert van der Helm
37a74c8f98
Get rid of the dedicated AEffect socket
2020-05-13 13:15:52 +02:00
Robbert van der Helm
85be5de0ed
Rearrange the usage section of the readme
...
For when I add plugin groups for inter-plugin communication.
2020-05-13 12:53:40 +02:00
Robbert van der Helm
ae0b38d027
Make plugin dir a variable in the example scripts
...
To make it a bit more obvious that this can be set to any other location
that contains VST plugins.
2020-05-13 12:50:11 +02:00
Robbert van der Helm
1abdeb52c6
Bump version to 1.1.4
1.1.4
2020-05-12 23:02:34 +02:00