mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2025-08-22 06:21:00 +00:00
Refactor naughty static variable hiding in WidebandSpectrum.
This commit is contained in:
@@ -34,8 +34,6 @@ void WidebandSpectrum::execute(const buffer_c8_t& buffer) {
|
|||||||
// 2048 complex8_t samples per buffer.
|
// 2048 complex8_t samples per buffer.
|
||||||
// 102.4us per buffer. 20480 instruction cycles per buffer.
|
// 102.4us per buffer. 20480 instruction cycles per buffer.
|
||||||
|
|
||||||
static int phase = 0;
|
|
||||||
|
|
||||||
if( phase == 0 ) {
|
if( phase == 0 ) {
|
||||||
std::fill(spectrum.begin(), spectrum.end(), 0);
|
std::fill(spectrum.begin(), spectrum.end(), 0);
|
||||||
}
|
}
|
||||||
|
@@ -43,6 +43,7 @@ private:
|
|||||||
std::array<complex16_t, 256> spectrum;
|
std::array<complex16_t, 256> spectrum;
|
||||||
|
|
||||||
void streaming_config(const SpectrumStreamingConfigMessage& message);
|
void streaming_config(const SpectrumStreamingConfigMessage& message);
|
||||||
|
size_t phase = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif/*__PROC_WIDEBAND_SPECTRUM_H__*/
|
#endif/*__PROC_WIDEBAND_SPECTRUM_H__*/
|
||||||
|
Reference in New Issue
Block a user