fork/rust-sdks

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

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

livekit/livekit-ffi@0.13.0
1.5 KiB34 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#define PFFFT_DOUBLE 0
5#include "pffft-wrap.c"
6
7#include "rdft_t.h"
8
9static void * setup(int len) {return pffft_new_setup(len, PFFFT_REAL);}
10static void forward  (int length, void * setup, float * h, float * scratch) {pffft_transform        (setup, h, h, scratch, PFFFT_FORWARD); (void)length;}
11static void oforward (int length, void * setup, float * h, float * scratch) {pffft_transform_ordered(setup, h, h, scratch, PFFFT_FORWARD); (void)length;}
12static void backward (int length, void * setup, float * H, float * scratch) {pffft_transform        (setup, H, H, scratch, PFFFT_BACKWARD);(void)length;}
13static void obackward(int length, void * setup, float * H, float * scratch) {pffft_transform_ordered(setup, H, H, scratch, PFFFT_BACKWARD);(void)length;}
14static void convolve(int length, void * setup, float * H, float const * with) {pffft_zconvolve(setup, H, with, H); (void)length;}
15static int multiplier(void) {return 1;}
16static int flags(void) {return RDFT_IS_SIMD | RDFT_NEEDS_SCRATCH;}
17
18fn_t _soxr_rdft32s_cb[] = {
19  (fn_t)setup,
20  (fn_t)setup,
21  (fn_t)pffft_destroy_setup,
22  (fn_t)forward,
23  (fn_t)oforward,
24  (fn_t)backward,
25  (fn_t)obackward,
26  (fn_t)convolve,
27  (fn_t)ORDERED_PARTIAL_CONVOLVE_SIMD,
28  (fn_t)multiplier,
29  (fn_t)pffft_reorder_back,
30  (fn_t)SIMD_ALIGNED_MALLOC,
31  (fn_t)SIMD_ALIGNED_CALLOC,
32  (fn_t)SIMD_ALIGNED_FREE,
33  (fn_t)flags,
34};