17 #ifndef SRCTOOLS_IIR_2X_RESAMPLER_H 18 #define SRCTOOLS_IIR_2X_RESAMPLER_H 20 #include "ResamplerStage.h" 24 static const unsigned int IIR_RESAMPER_CHANNEL_COUNT = 2;
25 static const unsigned int IIR_SECTION_ORDER = 2;
27 typedef FloatSample IIRCoefficient;
28 typedef FloatSample BufferedSample;
30 typedef BufferedSample SectionBuffer[IIR_SECTION_ORDER];
55 static double getPassbandFractionForQuality(Quality quality);
59 explicit IIRResampler(
const unsigned int useSectionsCount,
const IIRCoefficient useFIR,
const IIRSection useSections[]);
68 unsigned int sectionsCount;
70 SectionBuffer *buffer;
72 Constants(
const unsigned int useSectionsCount,
const IIRCoefficient useFIR,
const IIRSection useSections[],
const Quality quality);
81 void process(
const FloatSample *&inSamples,
unsigned int &inLength, FloatSample *&outSamples,
unsigned int &outLength);
82 unsigned int estimateInLength(
const unsigned int outLength)
const;
85 FloatSample lastInputSamples[IIR_RESAMPER_CHANNEL_COUNT];
92 explicit IIR2xDecimator(
const unsigned int useSectionsCount,
const IIRCoefficient useFIR,
const IIRSection useSections[]);
94 void process(
const FloatSample *&inSamples,
unsigned int &inLength, FloatSample *&outSamples,
unsigned int &outLength);
95 unsigned int estimateInLength(
const unsigned int outLength)
const;
100 #endif // SRCTOOLS_IIR_2X_RESAMPLER_H