- Timestamp:
- Nov 26, 2018, 4:30:14 PM (6 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
- Children:
- 5c3061e
- Parents:
- fe6a9a23
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/spectral/dct_plain.c
rfe6a9a23 r813ced8 32 32 }; 33 33 34 void del_aubio_dct_plain (aubio_dct_plain_t *s); 35 34 36 aubio_dct_plain_t * new_aubio_dct_plain (uint_t size) { 35 37 aubio_dct_plain_t * s = AUBIO_NEW(aubio_dct_plain_t); … … 38 40 if (aubio_is_power_of_two (size) == 1 && size > 16) { 39 41 AUBIO_WRN("dct_plain: using plain dct but size %d is a power of two\n", size); 42 } 43 if ((sint_t)size <= 0) { 44 AUBIO_ERR("dct_plain: can only create with size > 0, requested %d\n", 45 size); 46 goto failure; 40 47 } 41 48 … … 69 76 } 70 77 return s; 78 failure: 79 del_aubio_dct_plain(s); 80 return NULL; 71 81 } 72 82 73 83 void del_aubio_dct_plain (aubio_dct_plain_t *s) { 74 del_fmat(s->dct_coeffs); 75 del_fmat(s->idct_coeffs); 84 if (s->dct_coeffs) 85 del_fmat(s->dct_coeffs); 86 if (s->idct_coeffs) 87 del_fmat(s->idct_coeffs); 76 88 AUBIO_FREE(s); 77 89 } … … 79 91 void aubio_dct_plain_do(aubio_dct_plain_t *s, const fvec_t *input, fvec_t *output) { 80 92 if (input->length != output->length || input->length != s->size) { 81 AUBIO_WRN("dct_plain: using input length %d, but output length = %d and size = %d ",93 AUBIO_WRN("dct_plain: using input length %d, but output length = %d and size = %d\n", 82 94 input->length, output->length, s->size); 83 95 } … … 87 99 void aubio_dct_plain_rdo(aubio_dct_plain_t *s, const fvec_t *input, fvec_t *output) { 88 100 if (input->length != output->length || input->length != s->size) { 89 AUBIO_WRN("dct_plain: using input length %d, but output length = %d and size = %d ",101 AUBIO_WRN("dct_plain: using input length %d, but output length = %d and size = %d\n", 90 102 input->length, output->length, s->size); 91 103 }
Note: See TracChangeset
for help on using the changeset viewer.