mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-10 04:30:12 +02:00
Add stubs for implementing IAudioProcessor
This commit is contained in:
@@ -28,7 +28,7 @@
|
||||
// we'll need for all of our interfaces
|
||||
|
||||
using Steinberg::TBool, Steinberg::int8, Steinberg::int32, Steinberg::int64,
|
||||
Steinberg::tresult;
|
||||
Steinberg::uint32, Steinberg::tresult;
|
||||
|
||||
/**
|
||||
* Both `TUID` (`int8_t[16]`) and `FIDString` (`char*`) are hard to work with
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
#include <bitsery/ext/std_set.h>
|
||||
#include <bitsery/ext/std_variant.h>
|
||||
#include <bitsery/traits/array.h>
|
||||
#include <pluginterfaces/vst/ivstaudioprocessor.h>
|
||||
#include <pluginterfaces/vst/ivstcomponent.h>
|
||||
|
||||
#include "../../bitsery/ext/vst3.h"
|
||||
@@ -49,7 +50,8 @@
|
||||
* and `IConnectionPoint`. We should use the same approach as in the
|
||||
* plugin factory to implement multiple, possibly optional, interfaces.
|
||||
*/
|
||||
class YaComponent : public Steinberg::Vst::IComponent {
|
||||
class YaComponent : public Steinberg::Vst::IComponent,
|
||||
public Steinberg::Vst::IAudioProcessor {
|
||||
public:
|
||||
/**
|
||||
* These are the arguments for creating a `YaComponentPluginImpl`.
|
||||
@@ -419,6 +421,26 @@ class YaComponent : public Steinberg::Vst::IComponent {
|
||||
virtual tresult PLUGIN_API
|
||||
getState(Steinberg::IBStream* state) override = 0;
|
||||
|
||||
// From `IAudioProcessor`
|
||||
virtual tresult PLUGIN_API
|
||||
setBusArrangements(Steinberg::Vst::SpeakerArrangement* inputs,
|
||||
int32 numIns,
|
||||
Steinberg::Vst::SpeakerArrangement* outputs,
|
||||
int32 numOuts) override = 0;
|
||||
virtual tresult PLUGIN_API
|
||||
getBusArrangement(Steinberg::Vst::BusDirection dir,
|
||||
int32 index,
|
||||
Steinberg::Vst::SpeakerArrangement& arr) override = 0;
|
||||
virtual tresult PLUGIN_API
|
||||
canProcessSampleSize(int32 symbolicSampleSize) override = 0;
|
||||
virtual uint32 PLUGIN_API getLatencySamples() override = 0;
|
||||
virtual tresult PLUGIN_API
|
||||
setupProcessing(Steinberg::Vst::ProcessSetup& setup) override = 0;
|
||||
virtual tresult PLUGIN_API setProcessing(TBool state) override = 0;
|
||||
virtual tresult PLUGIN_API
|
||||
process(Steinberg::Vst::ProcessData& data) override = 0;
|
||||
virtual uint32 PLUGIN_API getTailSamples() override = 0;
|
||||
|
||||
protected:
|
||||
ConstructArgs arguments;
|
||||
};
|
||||
|
||||
@@ -155,3 +155,61 @@ tresult PLUGIN_API YaComponentPluginImpl::getState(Steinberg::IBStream* state) {
|
||||
|
||||
return response.result.native();
|
||||
}
|
||||
|
||||
tresult PLUGIN_API YaComponentPluginImpl::setBusArrangements(
|
||||
Steinberg::Vst::SpeakerArrangement* inputs,
|
||||
int32 numIns,
|
||||
Steinberg::Vst::SpeakerArrangement* outputs,
|
||||
int32 numOuts) {
|
||||
// TODO: Implement
|
||||
bridge.logger.log("TODO: IAudioProcessor::setBusArrangements()");
|
||||
return Steinberg::kNotImplemented;
|
||||
}
|
||||
|
||||
tresult PLUGIN_API YaComponentPluginImpl::getBusArrangement(
|
||||
Steinberg::Vst::BusDirection dir,
|
||||
int32 index,
|
||||
Steinberg::Vst::SpeakerArrangement& arr) {
|
||||
// TODO: Implement
|
||||
bridge.logger.log("TODO: IAudioProcessor::getBusArrangement()");
|
||||
return Steinberg::kNotImplemented;
|
||||
}
|
||||
|
||||
tresult PLUGIN_API
|
||||
YaComponentPluginImpl::canProcessSampleSize(int32 symbolicSampleSize) {
|
||||
// TODO: Implement
|
||||
bridge.logger.log("TODO: IAudioProcessor::canProcessSampleSize()");
|
||||
return Steinberg::kNotImplemented;
|
||||
}
|
||||
|
||||
uint32 PLUGIN_API YaComponentPluginImpl::getLatencySamples() {
|
||||
// TODO: Implement
|
||||
bridge.logger.log("TODO: IAudioProcessor::getLatencySamples()");
|
||||
return 0;
|
||||
}
|
||||
|
||||
tresult PLUGIN_API
|
||||
YaComponentPluginImpl::setupProcessing(Steinberg::Vst::ProcessSetup& setup) {
|
||||
// TODO: Implement
|
||||
bridge.logger.log("TODO: IAudioProcessor::setupProcessing()");
|
||||
return Steinberg::kNotImplemented;
|
||||
}
|
||||
|
||||
tresult PLUGIN_API YaComponentPluginImpl::setProcessing(TBool state) {
|
||||
// TODO: Implement
|
||||
bridge.logger.log("TODO: IAudioProcessor::setProcessing()");
|
||||
return Steinberg::kNotImplemented;
|
||||
}
|
||||
|
||||
tresult PLUGIN_API
|
||||
YaComponentPluginImpl::process(Steinberg::Vst::ProcessData& data) {
|
||||
// TODO: Implement
|
||||
bridge.logger.log("TODO: IAudioProcessor::process()");
|
||||
return Steinberg::kNotImplemented;
|
||||
}
|
||||
|
||||
uint32 PLUGIN_API YaComponentPluginImpl::getTailSamples() {
|
||||
// TODO: Implement
|
||||
bridge.logger.log("TODO: IAudioProcessor::getTailSamples()");
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -61,6 +61,23 @@ class YaComponentPluginImpl : public YaComponent {
|
||||
tresult PLUGIN_API setState(Steinberg::IBStream* state) override;
|
||||
tresult PLUGIN_API getState(Steinberg::IBStream* state) override;
|
||||
|
||||
tresult PLUGIN_API
|
||||
setBusArrangements(Steinberg::Vst::SpeakerArrangement* inputs,
|
||||
int32 numIns,
|
||||
Steinberg::Vst::SpeakerArrangement* outputs,
|
||||
int32 numOuts) override;
|
||||
tresult PLUGIN_API
|
||||
getBusArrangement(Steinberg::Vst::BusDirection dir,
|
||||
int32 index,
|
||||
Steinberg::Vst::SpeakerArrangement& arr) override;
|
||||
tresult PLUGIN_API canProcessSampleSize(int32 symbolicSampleSize) override;
|
||||
uint32 PLUGIN_API getLatencySamples() override;
|
||||
tresult PLUGIN_API
|
||||
setupProcessing(Steinberg::Vst::ProcessSetup& setup) override;
|
||||
tresult PLUGIN_API setProcessing(TBool state) override;
|
||||
tresult PLUGIN_API process(Steinberg::Vst::ProcessData& data) override;
|
||||
uint32 PLUGIN_API getTailSamples() override;
|
||||
|
||||
private:
|
||||
Vst3PluginBridge& bridge;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user