Refactor naughty static variable hiding in WidebandSpectrum.

This commit is contained in:
Jared Boone 2016-01-11 17:18:24 -08:00
parent 1f3c182b7f
commit a577bc9664
2 changed files with 1 additions and 2 deletions

View File

@ -34,8 +34,6 @@ void WidebandSpectrum::execute(const buffer_c8_t& buffer) {
// 2048 complex8_t samples per buffer.
// 102.4us per buffer. 20480 instruction cycles per buffer.
static int phase = 0;
if( phase == 0 ) {
std::fill(spectrum.begin(), spectrum.end(), 0);
}

View File

@ -43,6 +43,7 @@ private:
std::array<complex16_t, 256> spectrum;
void streaming_config(const SpectrumStreamingConfigMessage& message);
size_t phase = 0;
};
#endif/*__PROC_WIDEBAND_SPECTRUM_H__*/