Changeset f264b17 for src/temporal/a_weighting.c
- Timestamp:
- Jun 22, 2016, 1:00:10 PM (9 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:
- 4b9443c4
- Parents:
- 60fc05b (diff), 6769586 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/temporal/a_weighting.c
r60fc05b rf264b17 30 30 { 31 31 uint_t order; lsmp_t *a, *b; lvec_t *as, *bs; 32 33 if ((sint_t)samplerate <= 0) { 34 AUBIO_ERROR("aubio_filter: failed setting A-weighting with samplerate %d\n", samplerate); 35 return AUBIO_FAIL; 36 } 37 if (f == NULL) { 38 AUBIO_ERROR("aubio_filter: failed setting A-weighting with filter NULL\n"); 39 return AUBIO_FAIL; 40 } 41 42 order = aubio_filter_get_order (f); 43 if (order != 7) { 44 AUBIO_ERROR ("aubio_filter: order of A-weighting filter must be 7, not %d\n", order); 45 return 1; 46 } 47 32 48 aubio_filter_set_samplerate (f, samplerate); 33 49 bs = aubio_filter_get_feedforward (f); 34 50 as = aubio_filter_get_feedback (f); 35 51 b = bs->data, a = as->data; 36 order = aubio_filter_get_order (f);37 38 if (order != 7) {39 AUBIO_ERROR ("order of A-weighting filter must be 7, not %d\n", order);40 return 1;41 }42 52 43 53 /* select coefficients according to sampling frequency */ … … 245 255 { 246 256 aubio_filter_t *f = new_aubio_filter (7); 247 aubio_filter_set_a_weighting (f, samplerate); 257 if (aubio_filter_set_a_weighting(f,samplerate) != AUBIO_OK) { 258 del_aubio_filter(f); 259 return NULL; 260 } 248 261 return f; 249 262 }
Note: See TracChangeset
for help on using the changeset viewer.