mirror of
https://github.com/g4klx/MMDVM.git
synced 2026-04-07 23:45:07 +00:00
Add RingBuffer Template
This commit is contained in:
parent
973a1391d7
commit
05775f0bfa
8 changed files with 22 additions and 359 deletions
|
|
@ -21,17 +21,17 @@
|
|||
#define FMDOWNSAMPLER_H
|
||||
|
||||
#include "Config.h"
|
||||
#include "FMDownsampleRB.h"
|
||||
#include "RingBuffer.h"
|
||||
|
||||
class CFMDownsampler {
|
||||
public:
|
||||
CFMDownsampler(uint16_t length);
|
||||
void addSample(q15_t sample);
|
||||
inline bool getPackedData(uint8_t& data){ return m_ringBuffer.get(data); };
|
||||
inline bool hasOverflowed() { return m_ringBuffer.hasOverflowed(); };
|
||||
bool getPackedData(uint8_t& data);
|
||||
void reset();
|
||||
|
||||
private:
|
||||
CFMDownsampleRB m_ringBuffer;
|
||||
CRingBuffer<uint8_t> m_ringBuffer;
|
||||
|
||||
uint32_t m_samplePack;
|
||||
uint32_t *m_samplePackPointer;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue