From 392e86f25c2f85233791ebf4a73bc9098dacc3db Mon Sep 17 00:00:00 2001 From: Holger Wirtz Date: Fri, 1 Feb 2019 13:08:14 +0100 Subject: [PATCH] Removed double created variable. --- MicroMDAEPiano.ino | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/MicroMDAEPiano.ino b/MicroMDAEPiano.ino index d224406..15f12aa 100644 --- a/MicroMDAEPiano.ino +++ b/MicroMDAEPiano.ino @@ -264,7 +264,6 @@ void loop() { int16_t* audio_buffer_r; // pointer to AUDIO_BLOCK_SAMPLES * sizeof(int16_t) int16_t* audio_buffer_l; // pointer to AUDIO_BLOCK_SAMPLES * sizeof(int16_t) - const uint16_t audio_block_time_ms = 1000000 / (SAMPLE_RATE / AUDIO_BLOCK_SAMPLES); // Main sound calculation if (queue_r.available() && queue_l.available() && fill_audio_buffer > audio_block_time_us - 10) @@ -293,7 +292,7 @@ void loop() elapsedMicros t1; ep->process(audio_buffer_l, audio_buffer_r); uint32_t t2 = t1; - if (t2 > audio_block_time_ms) // everything greater 2.9ms is a buffer underrun! + if (t2 > audio_block_time_us) // everything greater 2.9ms is a buffer underrun! xrun++; if (t2 > render_time_max) render_time_max = t2;