Changeset a4364b8 for src/temporal/filter.c
- Timestamp:
- Sep 29, 2009, 7:43:12 AM (15 years ago)
- Branches:
- feature/autosink, feature/cnn, feature/cnn_org, feature/constantq, feature/crepe, feature/crepe_org, feature/pitchshift, feature/pydocstrings, feature/timestretch, fix/ffmpeg5, master, pitchshift, sampler, timestretch, yinfft+
- Children:
- c159aeb
- Parents:
- d9c45df
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/temporal/filter.c
rd9c45df ra4364b8 27 27 #include "mathutils.h" 28 28 #include "temporal/filter.h" 29 #include "temporal/filter_priv.h" 29 30 struct _aubio_filter_t { 31 uint_t order; 32 uint_t samplerate; 33 lvec_t * a; 34 lvec_t * b; 35 lvec_t * y; 36 lvec_t * x; 37 }; 30 38 31 39 void aubio_filter_do(aubio_filter_t * f, fvec_t * in) { … … 103 111 } 104 112 105 aubio_filter_t * new_aubio_filter(uint_t samplerate UNUSED, uint_t order, uint_t channels) { 113 lvec_t * aubio_filter_get_feedback ( aubio_filter_t *f ) { 114 return f->a; 115 } 116 117 lvec_t * aubio_filter_get_feedforward ( aubio_filter_t *f ) { 118 return f->b; 119 } 120 121 uint_t aubio_filter_get_order ( aubio_filter_t *f ) { 122 return f->order; 123 } 124 125 uint_t aubio_filter_get_samplerate ( aubio_filter_t *f ) { 126 return f->samplerate; 127 } 128 129 aubio_filter_t * new_aubio_filter(uint_t samplerate, 130 uint_t order, uint_t channels) { 106 131 aubio_filter_t * f = AUBIO_NEW(aubio_filter_t); 107 132 f->x = new_lvec(order, channels); … … 109 134 f->a = new_lvec(order, 1); 110 135 f->b = new_lvec(order, 1); 136 f->samplerate = samplerate; 137 f->order = order; 138 /* set default to identity */ 111 139 f->a->data[0][1] = 1.; 112 f->order = order;113 140 return f; 114 141 } 115 142 116 143 void del_aubio_filter(aubio_filter_t * f) { 117 AUBIO_FREE(f->a);118 AUBIO_FREE(f->b);119 AUBIO_FREE(f->x);120 AUBIO_FREE(f->y);144 del_lvec(f->a); 145 del_lvec(f->b); 146 del_lvec(f->x); 147 del_lvec(f->y); 121 148 AUBIO_FREE(f); 122 149 return;
Note: See TracChangeset
for help on using the changeset viewer.