Changeset feb694b for src/spectral/fft.c
- Timestamp:
- Apr 21, 2016, 7:36:56 PM (8 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:
- 00819aa
- Parents:
- ce3ff2b
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/spectral/fft.c
rce3ff2b rfeb694b 231 231 } 232 232 233 void aubio_fft_do(aubio_fft_t * s, fvec_t * input, cvec_t * spectrum) {233 void aubio_fft_do(aubio_fft_t * s, const fvec_t * input, cvec_t * spectrum) { 234 234 aubio_fft_do_complex(s, input, s->compspec); 235 235 aubio_fft_get_spectrum(s->compspec, spectrum); 236 236 } 237 237 238 void aubio_fft_rdo(aubio_fft_t * s, c vec_t * spectrum, fvec_t * output) {238 void aubio_fft_rdo(aubio_fft_t * s, const cvec_t * spectrum, fvec_t * output) { 239 239 aubio_fft_get_realimag(spectrum, s->compspec); 240 240 aubio_fft_rdo_complex(s, s->compspec, output); 241 241 } 242 242 243 void aubio_fft_do_complex(aubio_fft_t * s, fvec_t * input, fvec_t * compspec) {243 void aubio_fft_do_complex(aubio_fft_t * s, const fvec_t * input, fvec_t * compspec) { 244 244 uint_t i; 245 245 #ifndef HAVE_MEMCPY_HACKS … … 292 292 } 293 293 294 void aubio_fft_rdo_complex(aubio_fft_t * s, fvec_t * compspec, fvec_t * output) {294 void aubio_fft_rdo_complex(aubio_fft_t * s, const fvec_t * compspec, fvec_t * output) { 295 295 uint_t i; 296 296 #ifdef HAVE_FFTW3 … … 347 347 } 348 348 349 void aubio_fft_get_spectrum( fvec_t * compspec, cvec_t * spectrum) {349 void aubio_fft_get_spectrum(const fvec_t * compspec, cvec_t * spectrum) { 350 350 aubio_fft_get_phas(compspec, spectrum); 351 351 aubio_fft_get_norm(compspec, spectrum); 352 352 } 353 353 354 void aubio_fft_get_realimag(c vec_t * spectrum, fvec_t * compspec) {354 void aubio_fft_get_realimag(const cvec_t * spectrum, fvec_t * compspec) { 355 355 aubio_fft_get_imag(spectrum, compspec); 356 356 aubio_fft_get_real(spectrum, compspec); 357 357 } 358 358 359 void aubio_fft_get_phas( fvec_t * compspec, cvec_t * spectrum) {359 void aubio_fft_get_phas(const fvec_t * compspec, cvec_t * spectrum) { 360 360 uint_t i; 361 361 if (compspec->data[0] < 0) { … … 375 375 } 376 376 377 void aubio_fft_get_norm( fvec_t * compspec, cvec_t * spectrum) {377 void aubio_fft_get_norm(const fvec_t * compspec, cvec_t * spectrum) { 378 378 uint_t i = 0; 379 379 spectrum->norm[0] = ABS(compspec->data[0]); … … 386 386 } 387 387 388 void aubio_fft_get_imag(c vec_t * spectrum, fvec_t * compspec) {388 void aubio_fft_get_imag(const cvec_t * spectrum, fvec_t * compspec) { 389 389 uint_t i; 390 390 for (i = 1; i < ( compspec->length + 1 ) / 2 /*- 1 + 1*/; i++) { … … 394 394 } 395 395 396 void aubio_fft_get_real(c vec_t * spectrum, fvec_t * compspec) {396 void aubio_fft_get_real(const cvec_t * spectrum, fvec_t * compspec) { 397 397 uint_t i; 398 398 for (i = 0; i < compspec->length / 2 + 1; i++) {
Note: See TracChangeset
for help on using the changeset viewer.