Commit Graph

47 Commits

Author SHA1 Message Date
Robbert van der Helm bc0c13778f Implement IEditController::getParamNormalized() 2020-12-18 21:53:04 +01:00
Robbert van der Helm fcbf198fee Implement IEditController::plainParamToNormalized 2020-12-18 21:36:39 +01:00
Robbert van der Helm 78d5e3bbfb Implement IEditController::normalizedValueToPlain 2020-12-18 21:36:39 +01:00
Robbert van der Helm a4e2a18480 Implement IEditController::getParamValueByString() 2020-12-18 21:36:39 +01:00
Robbert van der Helm cfa4849467 Partially implement IConnectionPoint::connect()
This now works for direct connections, which is probably how most hosts
will use this.
2020-12-18 14:09:20 +01:00
Robbert van der Helm 585d1e736c Implement IEditController::getParamStringByValue() 2020-12-17 22:44:13 +01:00
Robbert van der Helm ccc5688f0c Implement IEditController::getParameterInfo() 2020-12-17 22:16:20 +01:00
Robbert van der Helm 4cc24f74d1 Implement IEditController::getParameterCount() 2020-12-17 21:55:12 +01:00
Robbert van der Helm 7eb7e87953 Implement IEditController::setComponentState() 2020-12-17 21:50:04 +01:00
Robbert van der Helm fe2de8de8d Unify handling for *::{get,set}State
Since these functions are exactly the same, and for whatever reason they
didn't just add them to the `IPluginBase` both `IComponent` and
`IEditController`. inherit from
2020-12-17 17:52:51 +01:00
Robbert van der Helm 11bf7532fa Rename the monolitic class to Vst3PluginProxy
Now it's starting to look promising.
2020-12-17 13:07:42 +01:00
Robbert van der Helm d8b2646563 Split off IComponent and create a monolithic class
We can now use implement all VST3 plugin interfaces through this class,
check whether the object from the plugin also supports these classes,
and then conditionally allow casting to the supported classes. This
should give us a one-to-one proxy of the original object.
2020-12-17 12:49:33 +01:00
Robbert van der Helm 6809e73d6b Split IPluginBase from IComponent
We're also going to need this for `IEditController`. Separating all of
these classes will also keep everything much more maintainable with all
of these associated structs.
2020-12-16 23:46:47 +01:00
Robbert van der Helm 1dd575e4a7 Implement IAudioProcessor::process()
With this the entire `IAudioProcessor` interface has been implemented
and in theory it should now be possible to process audio and events.
Logging for these requests still has to be implemented separately.
2020-12-16 18:55:34 +01:00
Robbert van der Helm c815b3903b Implement IAudioProcessor::getTailSamples() 2020-12-14 21:43:38 +01:00
Robbert van der Helm 007aa1e707 Implement IAudioProcessor::setProcessing() 2020-12-14 21:31:50 +01:00
Robbert van der Helm b1bcfd3873 Implement IAudioProcessor::setupProcessing() 2020-12-14 21:25:05 +01:00
Robbert van der Helm 0f59d6429d Implement IAudioProcessor::getLatencySamples() 2020-12-14 17:53:50 +01:00
Robbert van der Helm d9585fac78 Implement IAudioProcessor::canProcessSampleSize() 2020-12-14 17:12:49 +01:00
Robbert van der Helm b26c2e08a7 Implement IAudioProcessor::getBusArrangement() 2020-12-14 16:55:21 +01:00
Robbert van der Helm e3b442de57 Implement IAudioProcessor::setBusArrangements() 2020-12-14 16:40:40 +01:00
Robbert van der Helm e653142e45 Implement IComponent::getState()
With this the basic IComponent interface is fully implemented. Next will
be `IAudioProcessor` and `IConnectionPoint` as additions to IComponent.
We'll use the same `known_iids` mechanism as used in the plugin factory.
2020-12-14 12:38:35 +01:00
Robbert van der Helm 816d1c1501 Implement IComponent::setState() 2020-12-14 12:09:47 +01:00
Robbert van der Helm 7341fab0ea Implement IComponent::setActive() 2020-12-13 22:17:06 +01:00
Robbert van der Helm 43296675f6 Implement IComponent::activateBus() 2020-12-13 22:07:45 +01:00
Robbert van der Helm 5b6a8ebfac Implement IComponent::getRoutingInfo() 2020-12-13 21:51:56 +01:00
Robbert van der Helm 9df812952e Implement IComponent::GetBusInfo() 2020-12-13 16:56:09 +01:00
Robbert van der Helm 34b2fa8905 Implement IComponent::getBusCount() 2020-12-13 16:18:13 +01:00
Robbert van der Helm 116b618ac5 Implement IComponent::setIoMode() 2020-12-13 16:12:30 +01:00
Robbert van der Helm 32c1028736 Implement IPluginFactory3::setHostContext()
Now the plugin factories are fully implemented (at least, functionality
wise, we still can't create most kinds of objects).
2020-12-13 15:53:39 +01:00
Robbert van der Helm e21ee31ee8 Implement plugin side of IPluginBase::initialize() 2020-12-13 14:30:51 +01:00
Robbert van der Helm 39984ad442 Use the new approach for creating plugin factory
Directly serializing and deserializing into objects was and more
boilerplate heavy (since we now need two implementations even though we
only use one), and also much less flexible because we can't wrap
payloads in structs or provide optional values that way.
2020-12-12 21:53:38 +01:00
Robbert van der Helm f637e6ad18 Rename Create/Destroy to Construct/Destruct
This is less likely to clash with names used by interfaces and it's a
bit clearer what's going on (since they are basically proxies for
constructors and destructors).
2020-12-12 16:18:47 +01:00
Robbert van der Helm 68084bc555 Implement IComponent::terminate() 2020-12-12 16:18:47 +01:00
Robbert van der Helm 699ddfd2ea Implement YaComponentPluginImpl destructor
When the object gets dropped through the reference counting system, the
object should also be dropped in the Wine plugin host.
2020-12-11 22:59:32 +01:00
Robbert van der Helm ed743e6f22 Bundle associated messages with their interfaces
Once we start implementing all of the control messages/callbacks things
could quickly get out of hand otherwise.
2020-12-08 11:25:58 +01:00
Robbert van der Helm 5e85517130 Add the base for an IComponent implementation 2020-12-07 23:52:17 +01:00
Robbert van der Helm d59a96b379 Move VST3 serializers to the structs 2020-12-07 22:33:41 +01:00
Robbert van der Helm e20fc8c7e6 Fix Vst{2,3}Logger::log_trace 2020-12-07 18:28:17 +01:00
Robbert van der Helm 8ea40cd9f9 Rework Vst3MessageHandler::receive_messages
This now takes a regular overloaded function and the visiting is done in
`receive_messages()` itself. This way we can use templates to ensure
that the return type is correct. Otherwise auto will cause issues in the
future when we want to return multiple concrete types from a function
that takes a single variant. The alternative would be both receiving a
variant as a parameter and then returning another variant as a result,
but that is much less type safe.
2020-12-07 18:28:16 +01:00
Robbert van der Helm c2503f8aaa Send the factory from the Wine host to the plugin 2020-12-07 18:28:16 +01:00
Robbert van der Helm 79c6f02d91 Request and deserialize plugin factory from plugin 2020-12-07 18:28:16 +01:00
Robbert van der Helm d5374e4540 💥 Rework Vst3MessageHandler
- Now allows direct deserialization into existing objects. This will be
  necessary for our VST3 implementations since the interface instances
  we'll deserialize into will not be trivially constructable because
  they have to be able to do callbacks.
- `ControlResponse` and `CallbackResponse` were dropped. These response
  enums are not necessary because of the `T::Response` associated type
  and returning the types directly makes the direct deserialization
  possible.
2020-12-07 18:28:16 +01:00
Robbert van der Helm 42f3639e93 Add boilerplate for PluginFactory serialization 2020-12-07 18:28:16 +01:00
Robbert van der Helm c1e7f53cd0 💥 Major refactor of initialization plumbing
To account for the differences in VST2 plugins and VST3 modules we had
to wrap most of our old functions from `src/plugin/utils.h` in a new
`PluginInfo` struct that gathers all of this information while taking
into account the differences between VST2 and VST3 plugins.

With this change things are also a lot more organized. We can just query
the plugin information we need rather than having to store things
separately or having to recalculate things. This also moved the
responsibility of all the weird `WINEPREFIX` behaviour to a single place
instead of having it spread around `utils.pp`, the initialisation
message, and `host-procoess.cpp`.
2020-12-07 18:28:16 +01:00
Robbert van der Helm 70405e8917 Encapsulate our VST3 message handling pattern
Similarly to how how we do it in `EventHandler`.
2020-12-07 18:28:16 +01:00
Robbert van der Helm db1a51af5c Add serialization primitives for VST3 2020-12-07 18:28:16 +01:00