Squelch special case when threshold == 0, do not squelch.

This commit is contained in:
Jared Boone 2016-01-10 20:16:21 -08:00
parent 01df79641c
commit 5dac0bbe49

View File

@ -25,6 +25,10 @@
#include <array>
bool FMSquelch::execute(const buffer_s16_t& audio) {
if( threshold_squared == 0 ) {
return true;
}
// TODO: No hard-coded array size.
std::array<int16_t, N> squelch_energy_buffer;
const buffer_s16_t squelch_energy {