mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-07-30 01:59:13 -04:00
Extract spectrum collector from BasebandProcessor.
Code size improvement, and less confused classes. :-)
This commit is contained in:
parent
75b1cc25ff
commit
088f60f2bc
15 changed files with 193 additions and 86 deletions
|
@ -23,6 +23,7 @@
|
|||
#define __PROC_WIDEBAND_SPECTRUM_H__
|
||||
|
||||
#include "baseband_processor.hpp"
|
||||
#include "spectrum_collector.hpp"
|
||||
|
||||
#include <cstddef>
|
||||
#include <array>
|
||||
|
@ -32,10 +33,14 @@ class WidebandSpectrum : public BasebandProcessor {
|
|||
public:
|
||||
void execute(const buffer_c8_t& buffer) override;
|
||||
|
||||
void on_update_spectrum() override { channel_spectrum.update(); }
|
||||
|
||||
private:
|
||||
size_t sample_count = 0;
|
||||
|
||||
std::array<std::complex<float>, 256> spectrum;
|
||||
SpectrumCollector channel_spectrum { 1 };
|
||||
|
||||
std::array<complex16_t, 256> spectrum;
|
||||
};
|
||||
|
||||
#endif/*__PROC_WIDEBAND_SPECTRUM_H__*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue