aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/LV2/src/BassKit/BassKit.cpp
diff options
context:
space:
mode:
authorHarald Eilertsen <haraldei@anduin.net>2020-08-02 22:27:04 +0200
committerHarald Eilertsen <haraldei@anduin.net>2020-08-02 22:27:04 +0200
commitc19599e7009afc1d6e859a0129ae9fc22427fb98 (patch)
treef8545423b50714fbf7b5765b9072bfbd74c45333 /plugins/LV2/src/BassKit/BassKit.cpp
parent3338e9d4c7816ee3281c304c5dae6ade5dca6a41 (diff)
downloadairwindows-lv2-port-c19599e7009afc1d6e859a0129ae9fc22427fb98.tar.gz
airwindows-lv2-port-c19599e7009afc1d6e859a0129ae9fc22427fb98.tar.bz2
airwindows-lv2-port-c19599e7009afc1d6e859a0129ae9fc22427fb98.zip
LV2: Port BassKit plugin.
There's an issue, where it seems the plugin will only produce noise if it's active when starting playback. Enabling it after playback has started seems to work fine. This is puzzling and will have to be investigated further at some time.
Diffstat (limited to 'plugins/LV2/src/BassKit/BassKit.cpp')
-rw-r--r--plugins/LV2/src/BassKit/BassKit.cpp28
1 files changed, 28 insertions, 0 deletions
diff --git a/plugins/LV2/src/BassKit/BassKit.cpp b/plugins/LV2/src/BassKit/BassKit.cpp
new file mode 100644
index 0000000..d3a2896
--- /dev/null
+++ b/plugins/LV2/src/BassKit/BassKit.cpp
@@ -0,0 +1,28 @@
+#include "BassKit.h"
+#include <iostream>
+#include <lv2wrapper.h>
+
+BassKit::BassKit(double rate)
+ : LV2Plugin(rate)
+ , oscGate(1.0)
+{
+}
+
+void BassKit::run(uint32_t num_samples)
+{
+ A = *params[0];
+ B = *params[1];
+ C = *params[2];
+ D = *params[3];
+
+ processReplacing(const_cast<float **>(in), out, num_samples);
+}
+
+//
+// Include the processing code from the VST version.
+//
+#include <cmath>
+#include "../../../LinuxVST/src/BassKit/BassKitProc.cpp"
+
+// Create the LV2Wrapper and register the plugin
+LV2Wrapper<BassKit> plugin;