fork/rust-sdks

git clone https://git.julia.blue/fork/rust-sdks

Théo Monnomsoxr-sys (#438)2e4d385

livekit/livekit-ffi@0.13.0
989 B33 linesraw
1/* SoX Resampler Library      Copyright (c) 2007-13 robs@users.sourceforge.net
2 * Licence for this file: LGPL v2.1                  See LICENCE for details. */
3
4#include <stdlib.h>
5#include <math.h>
6#include <libavcodec/avfft.h>
7#include "filter.h"
8#include "rdft_t.h"
9
10static void * forward_setup(int len) {return av_rdft_init((int)(log(len)/log(2)+.5),DFT_R2C);}
11static void * backward_setup(int len) {return av_rdft_init((int)(log(len)/log(2)+.5),IDFT_C2R);}
12static void rdft(int length, void * setup, float * h) {av_rdft_calc(setup, h); (void)length;}
13static int multiplier(void) {return 2;}
14static void nothing(void) {}
15static int flags(void) {return 0;}
16
17fn_t _soxr_rdft32_cb[] = {
18  (fn_t)forward_setup,
19  (fn_t)backward_setup,
20  (fn_t)av_rdft_end,
21  (fn_t)rdft,
22  (fn_t)rdft,
23  (fn_t)rdft,
24  (fn_t)rdft,
25  (fn_t)_soxr_ordered_convolve_f,
26  (fn_t)_soxr_ordered_partial_convolve_f,
27  (fn_t)multiplier,
28  (fn_t)nothing,
29  (fn_t)malloc,
30  (fn_t)calloc,
31  (fn_t)free,
32  (fn_t)flags,
33};