mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-07-30 10:09:25 -04:00
Further template BlockDecimator by element type, use for audio buffer.
Appropriating for use as a buffer accumulator that will save up enough audio samples to put into an audio DMA buffer.
This commit is contained in:
parent
aead1d8798
commit
a558565886
8 changed files with 23 additions and 20 deletions
|
@ -27,6 +27,7 @@
|
|||
#include "dsp_iir.hpp"
|
||||
#include "dsp_squelch.hpp"
|
||||
|
||||
#include "block_decimator.hpp"
|
||||
#include "audio_stats_collector.hpp"
|
||||
|
||||
#include <cstdint>
|
||||
|
@ -43,6 +44,8 @@ public:
|
|||
void write(const buffer_f32_t& audio);
|
||||
|
||||
private:
|
||||
BlockDecimator<float, 32> block_buffer { 1 };
|
||||
|
||||
IIRBiquadFilter hpf;
|
||||
IIRBiquadFilter deemph;
|
||||
FMSquelch squelch;
|
||||
|
@ -51,6 +54,7 @@ private:
|
|||
|
||||
uint64_t audio_present_history = 0;
|
||||
|
||||
void on_block(const buffer_f32_t& audio);
|
||||
void fill_audio_buffer(const buffer_f32_t& audio);
|
||||
void feed_audio_stats(const buffer_f32_t& audio);
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue