Avoid glitches and noise when distortion fx are loaded

pull/795/head
Javier Nonis 2 weeks ago
parent 4d2d79c0f5
commit 4632800a95
  1. 14
      src/effect_audio/effect_bigmuff.cpp
  2. 4
      src/effect_audio/effect_bigmuff.h
  3. 10
      src/effect_audio/effect_ds1.cpp
  4. 4
      src/effect_audio/effect_ds1.h

@ -133,6 +133,18 @@ void AudioEffectBigMuff::doProcess(const float32_t* inblockL, const float32_t* i
cont = 1;
if (inblockL != outblockL)
{
memcpy(outblockL, inblockL, len * sizeof(float32_t));
}
if (inblockR != outblockR)
{
memcpy(outblockR, inblockR, len * sizeof(float32_t));
}
printf("Realloc Big Muff END\n");
fflush(NULL);
return;
}
@ -231,7 +243,7 @@ void AudioEffectBigMuff::doProcess(const float32_t* inblockL, const float32_t* i
/*****************************************************************/
for (uint32_t i=1; i<=len; i++)
for (uint32_t i=1; i<=len; i++)
{
outblockL[i-1] = y3[i-1]*OUTPUT_GAIN; //-26dB
outblockR[i-1] = outblockL[i-1];

@ -17,7 +17,11 @@ public:
static const unsigned ID = 5;
static constexpr const char* NAME = "Big Muff";
#ifdef ARM_ALLOW_MULTI_CORE
static const unsigned TAMANHO_DO_BUFFER = 256;
#else
static const unsigned TAMANHO_DO_BUFFER = 1024;
#endif
static constexpr float32_t INPUT_GAIN = 1;
static constexpr float32_t OUTPUT_GAIN = 1;

@ -131,6 +131,14 @@ void AudioEffectDS1::doProcess(const float32_t* inblockL, const float32_t* inblo
cont = 1;
if (inblockL != outblockL)
{
memcpy(outblockL, inblockL, len * sizeof(float32_t));
}
if (inblockR != outblockR) {
memcpy(outblockR, inblockR, len * sizeof(float32_t));
}
return;
}
@ -229,7 +237,7 @@ void AudioEffectDS1::doProcess(const float32_t* inblockL, const float32_t* inblo
Down8_Float(outblockL, y2, len);
for (uint32_t i=1; i<=len; i++)
for (uint32_t i=1; i<=len; i++)
{
outblockL[i-1] = outblockL[i-1]*OUTPUT_GAIN; //-15dB
outblockR[i-1] = outblockL[i-1];

@ -16,7 +16,11 @@ public:
// ID must be unique for each AudioEffect
static const unsigned ID = 4;
static constexpr const char* NAME = "DS1";
#ifdef ARM_ALLOW_MULTI_CORE
static const unsigned TAMANHO_DO_BUFFER = 256;
#else
static const unsigned TAMANHO_DO_BUFFER = 1024;
#endif
static constexpr float32_t INPUT_GAIN = 1;
static constexpr float32_t OUTPUT_GAIN = 1;

Loading…
Cancel
Save