Try to decrease max_notes if CPU limit reached

Experimental
pull/8/head
Dirk Niggemann 5 years ago
parent f03960fb75
commit 2bf1c644ef
  1. 7
      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;

Loading…
Cancel
Save