diff --git a/MicroDexed.ino b/MicroDexed.ino index 9ef61dc..42ce98d 100644 --- a/MicroDexed.ino +++ b/MicroDexed.ino @@ -13,7 +13,7 @@ This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License @@ -252,16 +252,19 @@ uint8_t selected_instance_id = 0; #ifdef TEENSY4 #if NUM_DEXED>1 int8_t midi_decay[NUM_DEXED] = { -1, -1}; -int perform_attack_mod[NUM_DEXED] = { 0, 0}; -int perform_release_mod[NUM_DEXED] = { 0, 0}; #else int8_t midi_decay[NUM_DEXED] = { -1}; -int perform_attack_mod[NUM_DEXED] = { 0 }; -int perform_release_mod[NUM_DEXED] = { 0 }; #endif elapsedMillis midi_decay_timer; #endif +#if NUM_DEXED>1 +int perform_attack_mod[NUM_DEXED] = { 0, 0}; +int perform_release_mod[NUM_DEXED] = { 0, 0}; +#else +int perform_attack_mod[NUM_DEXED] = { 0 }; +int perform_release_mod[NUM_DEXED] = { 0 }; +#endif #if defined(USE_FX) // Allocate the delay lines for chorus int16_t delayline[NUM_DEXED][MOD_DELAY_SAMPLE_BUFFER]; diff --git a/config.h b/config.h index e006e0f..04ba371 100644 --- a/config.h +++ b/config.h @@ -128,11 +128,11 @@ //* AUDIO SOFTWARE SETTINGS //************************************************************************************************* #define SAMPLE_RATE 44100 -//#if AUDIO_BLOCK_SAMPLES == 64 -//#define AUDIO_MEM 256 -//#else -#define AUDIO_MEM 750 -//#endif +#if AUDIO_BLOCK_SAMPLES == 64 +#define AUDIO_MEM 256 +#else +#define AUDIO_MEM 64 +#endif #ifdef TEENSY_AUDIO_BOARD /* @@ -170,13 +170,10 @@ #else #if defined(TEENSY3_6) #define DELAY_MAX_TIME 500 -#define AUDIO_MEM 360 #elif defined(TEENSY4) #define DELAY_MAX_TIME 1000 -#define AUDIO_MEM 750 #else #define DELAY_MAX_TIME 250 -#define AUDIO_MEM 200 #endif #endif