00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 #if !defined(_SPANDSP_COMPLEX_FILTERS_H_)
00027 #define _SPANDSP_COMPLEX_FILTERS_H_
00028
00029 typedef struct filter_s filter_t;
00030
00031 typedef float (*filter_step_func_t)(filter_t *fi, float x);
00032
00033
00034 typedef struct
00035 {
00036 int nz;
00037 int np;
00038 filter_step_func_t fsf;
00039 } fspec_t;
00040
00041 struct filter_s
00042 {
00043 fspec_t *fs;
00044 float sum;
00045 int ptr;
00046 float v[];
00047 };
00048
00049 typedef struct
00050 {
00051 filter_t *ref;
00052 filter_t *imf;
00053 } cfilter_t;
00054
00055 #if defined(__cplusplus)
00056 extern "C"
00057 {
00058 #endif
00059
00060 SPAN_DECLARE(filter_t *) filter_create(fspec_t *fs);
00061 SPAN_DECLARE(void) filter_delete(filter_t *fi);
00062 SPAN_DECLARE(float) filter_step(filter_t *fi, float x);
00063
00064 SPAN_DECLARE(cfilter_t *) cfilter_create(fspec_t *fs);
00065 SPAN_DECLARE(void) cfilter_delete(cfilter_t *cfi);
00066 SPAN_DECLARE(complexf_t) cfilter_step(cfilter_t *cfi, const complexf_t *z);
00067
00068 #if defined(__cplusplus)
00069 }
00070 #endif
00071
00072 #endif
00073