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.
This commit is contained in:
Robbert van der Helm
2020-05-22 23:20:06 +02:00
parent a246ddf344
commit 3a9d902c72
2 changed files with 134 additions and 111 deletions
+3 -3
View File
@@ -74,9 +74,9 @@ class Vst2Bridge {
// below. They're defined here because we can't use lambdas with WinAPI's
// `CreateThread` which is needed to support the proper call conventions the
// VST plugins expect.
[[noreturn]] void handle_dispatch_midi_events();
[[noreturn]] void handle_parameters();
[[noreturn]] void handle_process_replacing();
void handle_dispatch_midi_events();
void handle_parameters();
void handle_process_replacing();
/**
* Forward the host callback made by the plugin to the host and return the