Files
snapclient/components/dsp_processor/include/dsp_processor.h
Carlos 15b4baba28 - merge with original master from jorgen
- minimize RAM usage of all components
- use both IRAM and DRAM in player component so we can buffer up to 1s on modules without SPI RAM
- support fragemented pcm chunks so we can use all available RAM if there isn't a big enough block available but still enough HEAP
- reinclude all components from jorgen's master branch
- add custom i2s driver to get a precise timing of initial sync
- change wrong usage of esp_timer for latency measurement of snapcast protocol
- add player component
2021-08-19 21:57:16 +02:00

47 lines
757 B
C

#ifndef _DSP_PROCESSOR_H_
#define _DSP_PROCESSOR_H_
typedef enum dspFlows {
dspfStereo,
dspfBiamp,
dspf2DOT1,
dspfFunkyHonda,
dspfBassBoost
} dspFlows_t;
enum filtertypes {
LPF,
HPF,
BPF,
BPF0DB,
NOTCH,
ALLPASS360,
ALLPASS180,
PEAKINGEQ,
LOWSHELF,
HIGHSHELF
};
// Process node
typedef struct ptype {
int filtertype;
float freq;
float gain;
float q;
float *in, *out;
float coeffs[5];
float w[2];
} ptype_t;
// Process flow
typedef struct pnode {
ptype_t process;
struct pnode *next;
} pnode_t;
void dsp_setup_flow(double freq, uint32_t samplerate);
int dsp_processor(char *audio, size_t chunk_size, dspFlows_t dspFlow);
void dsp_set_xoverfreq(uint8_t, uint8_t, uint32_t);
#endif /* _DSP_PROCESSOR_H_ */