mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2025-08-14 08:07:37 +00:00
Move a few member variables to stack/constants.
This commit is contained in:
@@ -22,6 +22,16 @@
|
|||||||
#include "channel_decimator.hpp"
|
#include "channel_decimator.hpp"
|
||||||
|
|
||||||
buffer_c16_t ChannelDecimator::execute_decimation(buffer_c8_t buffer) {
|
buffer_c16_t ChannelDecimator::execute_decimation(buffer_c8_t buffer) {
|
||||||
|
const buffer_c16_t work_baseband_buffer {
|
||||||
|
work_baseband.data(),
|
||||||
|
work_baseband.size()
|
||||||
|
};
|
||||||
|
|
||||||
|
const buffer_s16_t work_audio_buffer {
|
||||||
|
(int16_t*)work_baseband.data(),
|
||||||
|
sizeof(work_baseband) / sizeof(int16_t)
|
||||||
|
};
|
||||||
|
|
||||||
/* 3.072MHz complex<int8_t>[2048], [-128, 127]
|
/* 3.072MHz complex<int8_t>[2048], [-128, 127]
|
||||||
* -> Shift by -fs/4
|
* -> Shift by -fs/4
|
||||||
* -> 3rd order CIC: -0.1dB @ 0.028fs, -1dB @ 0.088fs, -60dB @ 0.468fs
|
* -> 3rd order CIC: -0.1dB @ 0.028fs, -1dB @ 0.088fs, -60dB @ 0.468fs
|
||||||
|
@@ -62,15 +62,6 @@ public:
|
|||||||
private:
|
private:
|
||||||
std::array<complex16_t, 1024> work_baseband;
|
std::array<complex16_t, 1024> work_baseband;
|
||||||
|
|
||||||
const buffer_c16_t work_baseband_buffer {
|
|
||||||
work_baseband.data(),
|
|
||||||
work_baseband.size()
|
|
||||||
};
|
|
||||||
const buffer_s16_t work_audio_buffer {
|
|
||||||
(int16_t*)work_baseband.data(),
|
|
||||||
sizeof(work_baseband) / sizeof(int16_t)
|
|
||||||
};
|
|
||||||
|
|
||||||
//const bool fs_over_4_downconvert = true;
|
//const bool fs_over_4_downconvert = true;
|
||||||
|
|
||||||
dsp::decimate::TranslateByFSOver4AndDecimateBy2CIC3 translate;
|
dsp::decimate::TranslateByFSOver4AndDecimateBy2CIC3 translate;
|
||||||
|
Reference in New Issue
Block a user