diff --git a/.gitignore b/.gitignore index 259148f..b44b649 100644 --- a/.gitignore +++ b/.gitignore @@ -30,3 +30,6 @@ *.exe *.out *.app + +# +*.swp diff --git a/.swp b/.swp deleted file mode 100644 index 8bde060..0000000 Binary files a/.swp and /dev/null differ diff --git a/config.h b/config.h index d81c821..ebd746d 100644 --- a/config.h +++ b/config.h @@ -96,7 +96,8 @@ #else #define AUDIO_MEM 384 #endif -#define REDUCE_LOUDNESS 2 +#define REDUCE_LOUDNESS 0 +#define REDUCE_LOUDNESS_FACTOR 0.65 #else // IF TEENSY_AUDIO_BOARD #define SGTL5000_LINEOUT_LEVEL 29 #if AUDIO_BLOCK_SAMPLES == 64 diff --git a/dexed.cpp b/dexed.cpp index d00c8ff..187dfdb 100644 --- a/dexed.cpp +++ b/dexed.cpp @@ -156,6 +156,9 @@ void Dexed::getSamples(uint16_t n_samples, int16_t* buffer) #endif float f = static_cast(clip_val >> REDUCE_LOUDNESS) / 0x7fff; +#if defined(REDUCE_LOUDNESS_FACTOR) + f *= REDUCE_LOUDNESS_FACTOR; +#endif if (f > 1.0) { f = 1.0;