Fixing volume handling for dexed engine.

pull/32/head
Holger Wirtz 4 years ago
parent f2eea03669
commit 6c6dfd3484
  1. 5
      PluginFx.cpp
  2. 1
      PluginFx.h
  3. 2
      dexed.cpp

@ -219,3 +219,8 @@ void PluginFx::process(float *work, int sampleSize) {
}
*/
float PluginFx::getGain(void)
{
return(Gain);
}

@ -67,6 +67,7 @@ class PluginFx {
void init(int sampleRate);
void process(float *work, int sampleSize);
float getGain(void);
};
#endif // PLUGINFX_H_INCLUDED

@ -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

Loading…
Cancel
Save