diff --git a/source_microdexed.h b/source_microdexed.h index f0cb8f2..ffde2e2 100644 --- a/source_microdexed.h +++ b/source_microdexed.h @@ -29,6 +29,13 @@ class AudioSourceMicroDexed : public AudioStream, public Dexed { getSamples(AUDIO_BLOCK_SAMPLES, lblock->data); if (render_time > audio_block_time_us) // everything greater 2.9ms is a buffer underrun! xrun++; + if (render_time > audio_block_time_us - (audio_block_time_us / 10)) { + Serial.println("At CPU Limit"); + uint8_t nnotes = getNumNotesPlaying(); + //setMaxNotes(nnotes); + max_notes = nnotes; + } + if (render_time > render_time_max) render_time_max = render_time;