complex_filters.h
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
00027
00028 #if !defined(_SPANDSP_COMPLEX_FILTERS_H_)
00029 #define _SPANDSP_COMPLEX_FILTERS_H_
00030
00031 typedef struct filter_s filter_t;
00032
00033 typedef float (*filter_step_func_t)(filter_t *fi, float x);
00034
00035
00036 typedef struct
00037 {
00038 int nz;
00039 int np;
00040 filter_step_func_t fsf;
00041 } fspec_t;
00042
00043 struct filter_s
00044 {
00045 fspec_t *fs;
00046 float sum;
00047 int ptr;
00048 float v[];
00049 };
00050
00051 typedef struct
00052 {
00053 filter_t *ref;
00054 filter_t *imf;
00055 } cfilter_t;
00056
00057 #if defined(__cplusplus)
00058 extern "C"
00059 {
00060 #endif
00061
00062 filter_t *filter_create(fspec_t *fs);
00063 void filter_delete(filter_t *fi);
00064 float filter_step(filter_t *fi, float x);
00065
00066 cfilter_t *cfilter_create(fspec_t *fs);
00067 void cfilter_delete(cfilter_t *cfi);
00068 complexf_t cfilter_step(cfilter_t *cfi, const complexf_t *z);
00069
00070 #if defined(__cplusplus)
00071 }
00072 #endif
00073
00074 #endif
00075