diff --git a/PluginFx.cpp b/PluginFx.cpp index 001b3ed..1033dc7 100644 --- a/PluginFx.cpp +++ b/PluginFx.cpp @@ -219,3 +219,8 @@ void PluginFx::process(float *work, int sampleSize) { } */ + +float PluginFx::getGain(void) +{ + return(Gain); +} diff --git a/PluginFx.h b/PluginFx.h index 7946493..94016a1 100644 --- a/PluginFx.h +++ b/PluginFx.h @@ -67,6 +67,7 @@ class PluginFx { void init(int sampleRate); void process(float *work, int sampleSize); + float getGain(void); }; #endif // PLUGINFX_H_INCLUDED diff --git a/dexed.cpp b/dexed.cpp index 8941b2d..367101c 100644 --- a/dexed.cpp +++ b/dexed.cpp @@ -176,7 +176,7 @@ void Dexed::getSamples(uint16_t n_samples, int16_t* buffer) #ifdef USE_FX fx.process(sumbuf, n_samples); #else - arm_scale_f32(sumbuf, 1.0, sumbuf, n_samples); // This is crap! Have to set the right volume here... + arm_scale_f32(sumbuf, fx.getGain(), sumbuf, n_samples); #endif //#ifdef USE_TEENSY_DSP