Files
snapclient/components/dsp_processor/include/dsp_processor.h
Carlos e799aaac25 - add sdkconfig for NO_SPIRAM and SPIRAM situation
- detect snapcast configuration and init everything accordingly, e.g sample rate, chunk duration, ...
  o calculate apll predefines in dependence of sample rate
  o communicate these settings to interested parties
- remove typos
2021-08-26 22:08:17 +02:00

47 lines
783 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, uint32_t chunkDurationMs);
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_ */