#include "delay_mono.h" #include "delay_mono_wrapper.h" static int ch,n,L; static float *y[32]; void delay_mono_wrapper_init(void **p, int channels, int frame_size, double sample_rate, double wet_dry, double set_delay, double feed_back, double high_ratio, double hpf, double lpf) { Delay_mono_param param = {sample_rate, wet_dry, set_delay, feed_back, high_ratio, hpf, lpf}; *(Delay_mono **)p = delay_mono_new(channels, frame_size, ¶m); ch = channels; n = frame_size; } void delay_mono_wrapper_process(void *p, double sample_rate, double wet_dry, double set_delay, double feed_back, double high_ratio, double hpf, double lpf, float *src, float *dst) { int i; Delay_mono_param param = {sample_rate, wet_dry, set_delay, feed_back, high_ratio, hpf, lpf}; L = ch * n; for(i = 0; i < L; i ++) dst[i] = src[i]; for(i = 0; i < ch; i ++) y[i] = dst + i * n; delay_mono_process((Delay_mono *)p, y, ¶m); } void delay_mono_wrapper_delete(void *p) { delay_mono_delete((Delay_mono *)p); }