Commit Graph

11 Commits

Author SHA1 Message Date
Robbert van der Helm ed5f0c42d9 Fix off-by-one error in speaker arrangement read
This is why you don't do pointer arithmetic. Fixes an error message in
Renoise when trying to load a plugin as an effect.
2020-11-14 19:37:04 +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 4b53342514 💥 Encapsulate and rework all socket logic
This is a pretty huge change that will be important for being able to
handle nested or mutually recursive `dispatch()` and `audioMaster()`
calls. This sadly all had to be done in a single commit, so here's a
summary:

- `src/common/sockets.h:Sockets` contains all sockets on both the plugin
  and the Wine host side, and is used to both listen on and connect to
  the sockets.
- Sockets and other temporary files respect `$XDG_RUNTIME_DIR` instead
  of being dumped in `/tmp`.
- All sockets now have a unique endpoint in
  `/run/user/<uid>/yabridge-<plugin_name>-<random_id>/`. This is
  important for when we want to have multiple socket connections for
  handling `dispatch()` and `audioMaster()`.
- Because of the above, we no longer clean up the socket endpoint files
  after the connection gets established during initialization. Instead
  we'll remove the socket base directory when shutting down.
2020-10-25 21:24:56 +01:00
Robbert van der Helm dd843519ce Rename PluginParameters to GroupReuqest 2020-05-22 19:06:43 +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 e762a57c0d Move AEffect updating to a function 2020-05-10 13:03:41 +02:00
Robbert van der Helm 868b0fd357 Finally implement eff{Set,Get}SpeakerConfiguration
As mentioned in #1. This also indirectly allows yabridge to work under
Renoise.
2020-05-07 18:23:41 +02:00
Robbert van der Helm a82c3ac08c Add a dynamic wrapper for VstSpeakerArrangement
Similar to `DynamicVstEvents`, so we can serialize the object to binary
data transfer it over our sockets.
2020-05-07 16:45:04 +02:00
Robbert van der Helm 629fa72e0c Allow for an arbitrary number of midi events
By building the object on the heap in a buffer. I preferred the old
solution but this is more flexible.
2020-03-28 14:07:11 +01:00
Robbert van der Helm 10b6121cb8 Fix deserialization format of events
Apparently it uses VLAs, but in a very sneaky way.
2020-03-09 17:20:15 +01:00
Robbert van der Helm 69008e97a4 Serialize midi events using vectors
Easier than to implement C-style arrays in Bitsery and this way we also
don't have to worry about cleanup.

Serum still segfaults with multiple events so something is still off.
2020-03-09 15:31:35 +01:00