Robbert van der Helm
8d2cc3e9fb
Fix typo in readme introduction
2020-11-06 11:22:20 +01:00
Robbert van der Helm
caae9befc6
Mention software rendering for Scaler 2
2020-11-02 22:09:37 +01:00
Robbert van der Helm
ba6381e3ae
Rename EventHandler::{send,receive} to *_event(s?)
...
Since it does something way more involved than
`SocketHandler::{send,receive_multi}`, and that makes it a bit confusing
if you don't already know about that (and even if you do).
2020-11-01 12:01:50 +01:00
Robbert van der Helm
ec26b60e54
Also mention yabridgectl-git to avoid confusion
2020-10-31 16:11:18 +01:00
Robbert van der Helm
cd49985831
Mention the master branch version in the readme
...
Since it's functionally already done and I haven't run into any issues
during my testing.
2020-10-31 16:09:42 +01:00
Robbert van der Helm
fd3ff233fd
Mention that the workaround for REAPER is obselete
...
In the upcoming release of yabridge 1.8.0/2.0.0.
2020-10-31 13:39:08 +01:00
Robbert van der Helm
fa01ac843b
Replace all non-group sockets with SocketHandler
...
This greatly reduces the amount of boilerplate and potential for error.
2020-10-30 13:30:08 +01:00
Robbert van der Helm
42792a883d
Add EventHandler-like wrapper for simple sockets
...
This will greatly reduce boilerplate.
2020-10-30 12:58:31 +01:00
Robbert van der Helm
3788c1226b
Take buffers by reference in {read,write}_object()
...
This was how it originally worked (and how it should work, since
otherwise there's no reason to reuse buffers), but for some reason this
got removed at some point.
2020-10-30 12:52:02 +01:00
Robbert van der Helm
c18e4be039
Add more improvements to socket rework changelog
2020-10-30 01:30:49 +01:00
Robbert van der Helm
9633a70745
Use 'concurrent' instead of 'asynchronous'
...
While asynchronous is technically also correct, this makes it a bit
clearer what's going on.
2020-10-29 20:49:46 +01:00
Robbert van der Helm
66976ddfff
Clarify the plugin group changelog entry better
2020-10-28 21:32:48 +01:00
Robbert van der Helm
8b2fa0f589
Merge branch 'feature/socket-rework' into master
2020-10-28 21:21:10 +01:00
Robbert van der Helm
264f6ab8b5
Mention that all plugin group crashes are fixed
2020-10-28 21:19:50 +01:00
Robbert van der Helm
08cd7cf8ab
Join Win32Threads on destruct, like std::jthread
2020-10-28 21:11:34 +01:00
Robbert van der Helm
dd9957159a
Move the sockets after the threads in Vst2Bridge
...
This way the sockets can be destroyed before the threads, and we can
safely wait for the threads to shut down. I initially had Win32Thread
imitate std::jthread's join-on-destruct, but that was causing group
processes to hang. Now we can safely add that back again, and this will
fix some spurious segfaults during plugin scans when using plugin groups
containing a massive amount of plugins.
2020-10-28 21:05:14 +01:00
Robbert van der Helm
d81759c929
Add an explicit wait to our thread wrapper
2020-10-28 20:40:19 +01:00
Robbert van der Helm
93e01dacef
Explicitly close all sockets on shutdown
...
This way we're sure to break out of any blocking loops.
2020-10-28 20:38:01 +01:00
Robbert van der Helm
e70b042f9f
Update the versions of the tested DAWs
2020-10-28 19:53:46 +01:00
Robbert van der Helm
f39ee82bd4
Update socket rework changelog entry
2020-10-28 01:21:56 +01:00
Robbert van der Helm
bece654c2d
Rename PluginContext to MainContext for clarity
2020-10-28 01:02:56 +01:00
Robbert van der Helm
fac820c25a
Execute all non-unsafe opcodes on calling thread
...
This will require more testing of course, but I think it should be safe.
This would increase the potential maximal throughput in group hosts
significantly.
2020-10-27 23:18:59 +01:00
Robbert van der Helm
eb8d4ae1d8
Fix Win32Thread not capturing by move
...
std::function does not allow non-movable lambdas, so capturing by move
doesn't work there. And the old solution of course has issues with
dangling pointers (but because this is C++ the compiler still thinks
it's A-Ok).
2020-10-27 22:53:59 +01:00
Robbert van der Helm
1a18ea8614
Add a dependency for function2
...
std::function requires the function to be CopyConstructable and thus
does not allow you to capture by move, which is exactly what we need.
2020-10-27 22:53:08 +01:00
Robbert van der Helm
28886e7073
Replace all threads with Win32Thread in Wine host
2020-10-27 18:29:38 +01:00
Robbert van der Helm
bafc36614b
Properly forward arguments in Win32Thread
2020-10-27 18:28:23 +01:00
Robbert van der Helm
a6b5951d81
Replace std::jthread with Win32Thread everywhere
2020-10-27 17:38:13 +01:00
Robbert van der Helm
59b57f48da
Add a changelog entry for the thread rework
2020-10-27 17:30:18 +01:00
Robbert van der Helm
4038e198fe
Replace the Win32Thread proxy functions
...
Now that we can use lambdas instead.
2020-10-27 17:16:20 +01:00
Robbert van der Helm
1681ec9767
Add support for lambdas to Win32Thread
2020-10-27 17:04:40 +01:00
Robbert van der Helm
058eb9f2ee
Fix winedbg warning
2020-10-27 11:56:00 +01:00
Robbert van der Helm
dc72dd97a5
Reword the socket rework changelog entry
2020-10-27 11:13:39 +01:00
Robbert van der Helm
e51c7f7ae3
Get rid of hack_reaper_update_display
...
It is now no longer necessary.
2020-10-27 11:13:39 +01:00
Robbert van der Helm
5b00ddb0c4
Fall back to waiting when socket is not yet ready
...
This can happen with plugin groups.
2020-10-27 11:13:39 +01:00
Robbert van der Helm
016ceccc18
Mark several opcodes as unsafe
...
These potentially perform GUI operations and should always be handled on
the main thread.
2020-10-27 11:13:39 +01:00
Robbert van der Helm
e12a56978d
Reintroduce the additional IO contexts
...
Having these bound to the main context was not a good idea since that
would prevent sockets from being accepted on the Wine side while the
message loop is running.
Partial revert of ac17539ef3
2020-10-26 20:39:16 +01:00
Robbert van der Helm
ca2b95e7aa
Handle dispatch() directly during event handling
...
When the message loop is active and we get an incoming dispatch() event,
we'll just handle it directly. In practice this would only be needed
when the event is a response to an `audioMaster()` call made during the
event loop, but we can't know that. This allows the `getProgram()`
during `audioMasterUpdateDisplay()` in REAPER and Renoise to work
correctly. Hopefully this doesn't cause random rare breakage.
2020-10-26 20:03:54 +01:00
Robbert van der Helm
c95e8aa63c
Add a TODO for removing hack_reaper_update_display
2020-10-26 18:00:24 +01:00
Robbert van der Helm
4c490808c0
Add a changelog entry for the socket rework
2020-10-26 18:00:10 +01:00
Robbert van der Helm
816a2cbe01
[yabridgectl] Update Wine error detection
...
The usage string has changed, better to just match part of it so this
won't cause issues again in the future.
2020-10-26 17:54:41 +01:00
Robbert van der Helm
e067bbbfbc
Don't stop the whole IO context
...
This would break plugin groups since the different plugins share a
single IO context.
2020-10-26 17:44:34 +01:00
Robbert van der Helm
ac17539ef3
Drop all additional IO contexts
...
Not really needed (since the only other thing happening in the IO
context is processing stdio from the Wine process) and it was causing
some impossible to debug malloc failures in Boost.Asio.
2020-10-26 17:32:37 +01:00
Robbert van der Helm
cde7b4ec67
Properly move the sockets to the handler threads
...
At times like this you really wish you were writing Rust right now.
2020-10-26 15:48:57 +01:00
Robbert van der Helm
8d7826f1df
Handle incoming events from off-threads separately
...
On the Wine side we want to handle most events on the main UI thread.
We'll assume any events coming in from a secondary socket are safe and
can be handled directly.
2020-10-26 13:45:37 +01:00
Robbert van der Helm
81efa6febe
Listen for incoming secondary event requests
2020-10-26 12:58:03 +01:00
Robbert van der Helm
523ac64d11
Add a missing lock to reading from active_plugins
...
I've never seen this cause memory errors, but there exist a rare
situation where it could.
2020-10-26 12:45:38 +01:00
Robbert van der Helm
2f6883977f
Create secondary sockets for sending nested events
2020-10-26 12:13:27 +01:00
Robbert van der Helm
d82f8463d9
Use simple numerical IDs for plugins in groups
...
We'll be using a similar approach to identify threads for event
handlers.
2020-10-26 11:51:13 +01:00
Robbert van der Helm
74c3cab046
Move event handling logic to a dedicated class
...
Now all pieces are in place to allow handling events over multiple
socket connections.
2020-10-26 11:40:38 +01:00
Robbert van der Helm
54ed69c408
Merge events.h into communication.h
2020-10-25 21:37:04 +01:00