Commit Graph

151 Commits

Author SHA1 Message Date
Robbert van der Helm 8202a6b250 Add missing const qualifiers to member functions 2020-06-06 13:44:26 +02:00
Robbert van der Helm 33777d2876 Use same style for optional and avoid double check
I did not know that `std::optional::value()` did checked access. And I
still prefer a more explicit .has_value() over boolean conversion, but
this seems to be the accepted way to do this.
2020-06-05 22:35:56 +02:00
Robbert van der Helm ff298f3f46 Remove redundant conditions
As mentioned in C++ Core Guidelines ES.87.
2020-06-05 22:18:40 +02:00
Robbert van der Helm 1c44a2f2cb Also filter audioMasterGetCurrentProcessLevel
Some plugins call this every time they process audio.
2020-05-25 14:38:30 +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 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 8eb01cb519 Listen on the group socket and handle requests 2020-05-20 18:45:33 +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 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 994f3c9e38 Add a plugin group host application 2020-05-18 16:15:07 +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 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 4351b03e18 Mention that WantsVstRect can return nothing 2020-05-12 13:14:10 +02:00
Robbert van der Helm 901d985080 Fix potential issue with plugins reporting size
I thought this was a problem for a plugin when it was not, but I can
still see this being a source of segfaults.
2020-05-11 22:54:42 +02:00
Robbert van der Helm 686ca11ba8 Work around improperly late initializing plugins
This fixes the Roland Cloud plugins.
2020-05-10 13:42:20 +02:00
Robbert van der Helm ba91971829 Simplify object reading
No longer needs to read into an existing object after the last change,
and reusing that function here too makes it less error prone.
2020-05-10 13:10:58 +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 ded12379f9 Fix typo 2020-05-10 00:48:45 +02:00
Robbert van der Helm 99ecb2803e Add logging for the input speaker configuration 2020-05-07 18:23:54 +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 92f0d95357 Rename EventResponsePayload to be clearer 2020-05-07 17:23:22 +02:00
Robbert van der Helm a3aad51e41 Also add a second payload value to event responses
This will only be used for `effGetSpeakerArrangement`.
2020-05-07 17:23:22 +02:00
Robbert van der Helm 044b7fa9a2 Add a second payload value to events
This is for data passed through the `value` `intptr_t` parameter. The
only two events that use this are `effSetSpeakerArrangement` and
`effGetSpeakerArrangement`. Since this is such a rare occurrence we'll
leave the regular `value` field as it is.
2020-05-07 17:19:34 +02:00
Robbert van der Helm 3202239a93 Add speaker arrangement to event payload types 2020-05-07 16:47:30 +02:00
Robbert van der Helm 384805ac41 Add serialization for speaker arrangements 2020-05-07 16:47:30 +02:00
Robbert van der Helm ee5a4e6b50 Move the serialization function for VST events 2020-05-07 16:47:30 +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 0822e49c59 Add opcodes and structs for speaker arrangements 2020-05-07 15:53:43 +02:00
Robbert van der Helm 7b07a2bfe1 💥 Rename HostBridge to PluginBridge
As mentioned in the last commit. The original reasoning behind these
names was that the HostBridge talks to the host, and the PluginBridge
talks to the plugin, but you could also argue that the HostBridge should
be part of the Wine VST host and the PluginBridge should be part of the
VST plugin. This removes that ambiguity.
2020-05-07 13:10:03 +02:00
Robbert van der Helm dd684c26e1 Increase the maximum number of audio channels
This fixes #10, as Scaler was reporting 64 inputs.
2020-05-06 23:47:05 +02:00
Robbert van der Helm 1f404511d9 Make sure docstrings are at the declarations 2020-05-02 17:46:05 +02:00
Robbert van der Helm ed8e3ba114 Refactor event receiving to optimize MIDI handlign
This keeps compatibility with some weirdly designed plugins (such as
Kontakt) while avoiding some unnecessary data transformations. Before
this we'd convert from a `DynamicVstEvents` object to a `VstEvents`
object, back to a `DynamicVstEvents` and then finally back into another
`VstEvents` object. With this change we can skip the second half of the
conversions.
2020-05-01 14:06:06 +02:00
Robbert van der Helm 6c496da455 Clean up after reverting buffer handling change
This is what you get from not taking any breaks.
2020-04-30 22:45:22 +02:00
Robbert van der Helm eb94f63e2c Revert "Clean up chunk buffer retrieval for effGetChunk"
This reverts commit fb8fe035d8.

I was getting things mixed up.
2020-04-30 22:41:07 +02:00
Robbert van der Helm 6266072641 Explicitly list opcodes that should return strings
The automatic detection works fine in every case I've tested other than
Fabfilter plugins, but this is probably for the best.
2020-04-30 20:55:49 +02:00
Robbert van der Helm 2e9adbe310 Always write message sizes in 64-bit integers
This will make sure the sizes match on both the 32 and 64 bit host
applications. This way only the 32-bit application will have to convert
between 32 and 64 bit integers.
2020-04-30 12:32:27 +02:00
Robbert van der Helm 027d9a96d5 Always use 64-bit pointer types for serialization
This way the 32-bit host can cast them down to 32-bit integers when
needed, and the serialization pipeline can stay fixed. We're not passing
any pointers directly to the other application anyway so this should be
safe!
2020-04-29 17:17:33 +02:00
Robbert van der Helm c9060e984d Add another flag for enabling a bit bridge build 2020-04-29 16:55:47 +02:00
Robbert van der Helm 7ce42e4306 Add support for effGetMidiKeyName
Not a lot of plugins use it, but it's really nice to have when they do.
2020-04-28 12:54:36 +02:00
Robbert van der Helm fb8fe035d8 Clean up chunk buffer retrieval for effGetChunk 2020-04-28 12:48:31 +02:00
Robbert van der Helm ed9428da83 Fix chunk size formatting in log messages 2020-04-28 12:28:41 +02:00
Robbert van der Helm 641351d525 Also filter out the event with opcode 52
Not sure what this is, but it's called by Bitwig every time a buffer is
being processed.
2020-04-28 12:04:09 +02:00
Robbert van der Helm e515547d5a Add a todo on another event to filter 2020-04-27 18:56:14 +02:00
Robbert van der Helm e69d08c503 Add assertion for bytes written while sending
To avoid problems like 13dcb2f74a in the
future.
2020-04-27 18:00:01 +02:00
Robbert van der Helm f0d16c4afb Add note on potentially misbehaving type detection 2020-04-27 16:42:04 +02:00
Robbert van der Helm 13dcb2f74a Fix handling of large chunk data 2020-04-27 16:41:55 +02:00
Robbert van der Helm 527db1f49f Use different types for strings and binary data 2020-04-27 00:51:36 +02:00
Robbert van der Helm af6ae2c2ad Fix capitalization of the word MIDI 2020-04-26 18:19:10 +02:00
Robbert van der Helm aeac8e87fa Implement effGetParameterProperties 2020-04-26 16:53:34 +02:00