From 6dd021a943e73f08ae71644e8f6d7a788cd4a61c Mon Sep 17 00:00:00 2001 From: Chris Johnson Date: Mon, 22 Jul 2019 13:30:57 -0400 Subject: Bugfix for Mojo! Added dB markings to things and fixed a gain issue on all the VST versions --- plugins/LinuxVST/src/Mojo/Mojo.cpp | 2 +- plugins/LinuxVST/src/Mojo/MojoProc.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'plugins/LinuxVST') diff --git a/plugins/LinuxVST/src/Mojo/Mojo.cpp b/plugins/LinuxVST/src/Mojo/Mojo.cpp index bef296a..7b34fba 100755 --- a/plugins/LinuxVST/src/Mojo/Mojo.cpp +++ b/plugins/LinuxVST/src/Mojo/Mojo.cpp @@ -95,7 +95,7 @@ void Mojo::getParameterDisplay(VstInt32 index, char *text) { void Mojo::getParameterLabel(VstInt32 index, char *text) { switch (index) { - case kParamA: vst_strncpy (text, "", kVstMaxParamStrLen); break; + case kParamA: vst_strncpy (text, "dB", kVstMaxParamStrLen); break; default: break; // unknown parameter, shouldn't happen! } } diff --git a/plugins/LinuxVST/src/Mojo/MojoProc.cpp b/plugins/LinuxVST/src/Mojo/MojoProc.cpp index 303de25..60f986d 100755 --- a/plugins/LinuxVST/src/Mojo/MojoProc.cpp +++ b/plugins/LinuxVST/src/Mojo/MojoProc.cpp @@ -14,7 +14,7 @@ void Mojo::processReplacing(float **inputs, float **outputs, VstInt32 sampleFram float* out1 = outputs[0]; float* out2 = outputs[1]; - double gain = (A*24.0)-12.0; + double gain = pow(10.0,((A*24.0)-12.0)/20.0); while (--sampleFrames >= 0) { @@ -61,7 +61,7 @@ void Mojo::processDoubleReplacing(double **inputs, double **outputs, VstInt32 sa double* out1 = outputs[0]; double* out2 = outputs[1]; - double gain = (A*24.0)-12.0; + double gain = pow(10.0,((A*24.0)-12.0)/20.0); while (--sampleFrames >= 0) { -- cgit v1.2.3