16 if (samplerate_factor < 1) {
22 float decimation = (float)interp / samplerate_factor;
23 resampler->
decim_f = floor(decimation);
24 resampler->
decim_c = ceil(decimation);
29 if (fixed_point == 0) {
#define ESP_ERR_DSP_INVALID_PARAM
struct fir_f32_s fir_f32_t
Data struct of f32 fir filter.
struct fir_s16_s fir_s16_t
Data struct of s16 fir filter.
esp_err_t dsps_fir_f32_free(fir_f32_t *fir)
support arrays freeing function
esp_err_t dsps_fird_s16_aexx_free(fir_s16_t *fir)
support arrays freeing function
esp_err_t dsps_firmr_init_f32(fir_f32_t *fir, float *coeffs, float *delay, int length, int interp, int decim, int start_pos)
initialize structure for multi-rate FIR filter Function initialize structure for 32 bit floating poin...
esp_err_t dsps_firmr_init_s16(fir_s16_t *fir, int16_t *coeffs, int16_t *delay, int16_t coeffs_len, int16_t interp, int16_t decim, int16_t start_pos, int16_t shift)
initialize structure for multi-rate FIR filter Function initialize structure for 16 bit signed fixed ...
struct dsps_resample_mr_s dsps_resample_mr_t
Data struct of f32 multi-rate resampler.
static const float decim_avg_coeff
void dsps_resampler_mr_free(dsps_resample_mr_t *resampler)
Free the multi-rate resampler.
esp_err_t dsps_resampler_mr_init(dsps_resample_mr_t *resampler, void *coeffs, int16_t length, int16_t interp, float samplerate_factor, int32_t fixed_point, int16_t shift)
Initialize the multi-rate resampler.
int32_t dsps_resampler_mr_exec(dsps_resample_mr_t *resampler, void *input, void *output, int32_t length, int32_t length_correction)
Execute the multi-rate resampler.
int32_t(* dsps_firmr)(void *fir, void *input, void *output, int32_t length)