mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-02-25 09:01:12 -05:00
Refactor naughty static variable hiding in WidebandSpectrum.
This commit is contained in:
parent
1f3c182b7f
commit
a577bc9664
@ -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__*/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user