Browse Source

AudioAnalyzeRMS needs to treat no input as zeros

dds
PaulStoffregen 7 years ago
parent
commit
cc44014a69
1 changed files with 4 additions and 1 deletions
  1. +4
    -1
      analyze_rms.cpp

+ 4
- 1
analyze_rms.cpp View File

@@ -31,7 +31,10 @@
void AudioAnalyzeRMS::update(void)
{
audio_block_t *block = receiveReadOnly();
if (!block) return;
if (!block) {
count++;
return;
}
#if defined(KINETISK)
uint32_t *p = (uint32_t *)(block->data);
uint32_t *end = p + AUDIO_BLOCK_SAMPLES/2;

Loading…
Cancel
Save