Files
snapclient/components/dsp_processor/include/dsp_processor.h
Karl Osterseher 02206b21fb add support for sample rates different to 48kHz (#15)
- instead of storing chunk duration in ms store the frame count
  and do calculations based on that
- add updated snapserver.conf for reference (#17)
- some code clean up
- move Kconfig entries to correct place
- remove unnecessary Kconfig entries
- add necessary dependencies in Kconfig files

Signed-off-by: Karl Osterseher <karli_o@gmx.at>
2022-12-14 22:52:57 +01:00

48 lines
814 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 chunkInFrames);
int dsp_processor(char *audio, size_t chunk_size, dspFlows_t dspFlow);
void dsp_set_xoverfreq(uint8_t, uint8_t, uint32_t);
void dsp_set_vol(double volume);
#endif /* _DSP_PROCESSOR_H_ */