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
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
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
3202239a93
Add speaker arrangement to event payload types
2020-05-07 16:47:30 +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
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
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
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
f0d16c4afb
Add note on potentially misbehaving type detection
2020-04-27 16:42:04 +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
aeac8e87fa
Implement effGetParameterProperties
2020-04-26 16:53:34 +02:00
Robbert van der Helm
aee890fbf6
Remove the now unused ability to skip opcodes
...
If this is needed again in the future (it shouldn't be), then it should
be re-implemented using a separate function.
2020-04-26 16:30:11 +02:00
Robbert van der Helm
0ce9c1e3a4
Add another less verbose debug level
2020-04-26 15:42:01 +02:00
Robbert van der Helm
2e36c64796
Return a 0 for skipped events
...
Not that any events get skipped at the moment.
2020-04-21 18:13:22 +02:00
Robbert van der Helm
b13d7d554d
Prevent rare race conditions with get/setParameter
...
I've never seen it happen, but in theory they could be called
simultaneously.
2020-04-19 16:14:22 +02:00
Robbert van der Helm
9f3ed85208
Replace std::monostate with std::nullptr_t
...
This represents the underlying meaning better since we're mostly dealing
with the `data` void pointer argument.
2020-04-19 16:05:37 +02:00
Robbert van der Helm
717ffb719d
Remove resolved todo
2020-04-19 16:05:37 +02:00
Robbert van der Helm
106d1e3907
Use lock guards for mutexes
2020-04-17 15:37:03 +02:00
Robbert van der Helm
eed4677ed3
Fix VstTimeinfo responses and allow null responses
...
The host is allowed to return a null pointer if it doesn't support the
query.
2020-04-14 15:59:23 +02:00
Robbert van der Helm
effe584373
Actually only initialize the first value
2020-03-28 23:09:05 +01:00
Robbert van der Helm
8ab5fff914
Fix audioMasterSpecific related segfaults
...
Not initializing our buffer is fine if something is going to write to
it, but in this case the default way to handle
`audioMasterSpecific` (and any other opcode without specific behaviour)
would be to treat it as a writable string. Since the host wasn't
actually writing to it we would just send some old data from the stack
back which obviously would cause some plugins to crash.
2020-03-28 22:56:48 +01:00
Robbert van der Helm
cc52c87f34
Properly handle effGet{Input,Output}Properties
...
Apparently the plugin needs the actual contents of the struct for this
to work.
2020-03-26 16:24:49 +01:00
Robbert van der Helm
d2be82285a
Make sure messages can't get out of order
2020-03-23 22:33:28 +01:00
Robbert van der Helm
f1f7523248
Make the GUI embedding work
...
There's still a few things that need fixing.
2020-03-19 17:29:30 +01:00
Robbert van der Helm
eebfceff56
Implement the rest of the GUI events
...
The GUI is still not updating though.
2020-03-19 00:58:03 +01:00
Robbert van der Helm
1c17513936
Move all window handling to the Wine host side
2020-03-17 21:31:19 +01:00
Robbert van der Helm
d0a86887d3
Explicitely handle editor opening failures
2020-03-17 20:54:49 +01:00
Robbert van der Helm
e7e1b26455
Add the base for GUI handling
...
Still need to embed the opened window into the window provided by the
host.
2020-03-17 01:51:02 +01:00
Robbert van der Helm
44a953c2d2
Change argument order for event handling functions
2020-03-17 00:53:09 +01:00
Robbert van der Helm
7172a42c67
Prevent data races in host callbacks
2020-03-16 13:58:49 +01:00
Robbert van der Helm
8464706336
Handle AEffect object updates
2020-03-11 16:33:44 +01:00
Robbert van der Helm
ea8feb07a9
Reorder arguments
2020-03-11 16:08:09 +01:00
Robbert van der Helm
6ab7af10f9
Use the fancy new variant instead of strings
2020-03-11 16:04:49 +01:00
Robbert van der Helm
1ee0ffef8b
Wrap event result data in an std::variant
...
Gets a bit more complicated this way, but this avoids having to use
string to manually serialize and deserialize arbitrary objects.
The new options for `AEffect` and `VstTimeInfo` structs are not yet
used.
2020-03-11 15:52:56 +01:00
Robbert van der Helm
aa31665666
Move event handling its own file
2020-03-11 14:42:09 +01:00
Robbert van der Helm
b6c9acc57c
Add functions to encapsulate serialization
2020-02-09 17:22:45 +01:00
Robbert van der Helm
b757001435
Add basic communication with a child process
2020-02-08 17:18:39 +01:00