Changeset feb694b for src/spectral/fft.c


Ignore:
Timestamp:
Apr 21, 2016, 7:36:56 PM (8 years ago)
Author:
Paul Brossier <piem@piem.org>
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
Message:

src/spectral/: add const qualifiers

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/spectral/fft.c

    rce3ff2b rfeb694b  
    231231}
    232232
    233 void aubio_fft_do(aubio_fft_t * s, fvec_t * input, cvec_t * spectrum) {
     233void aubio_fft_do(aubio_fft_t * s, const fvec_t * input, cvec_t * spectrum) {
    234234  aubio_fft_do_complex(s, input, s->compspec);
    235235  aubio_fft_get_spectrum(s->compspec, spectrum);
    236236}
    237237
    238 void aubio_fft_rdo(aubio_fft_t * s, cvec_t * spectrum, fvec_t * output) {
     238void aubio_fft_rdo(aubio_fft_t * s, const cvec_t * spectrum, fvec_t * output) {
    239239  aubio_fft_get_realimag(spectrum, s->compspec);
    240240  aubio_fft_rdo_complex(s, s->compspec, output);
    241241}
    242242
    243 void aubio_fft_do_complex(aubio_fft_t * s, fvec_t * input, fvec_t * compspec) {
     243void aubio_fft_do_complex(aubio_fft_t * s, const fvec_t * input, fvec_t * compspec) {
    244244  uint_t i;
    245245#ifndef HAVE_MEMCPY_HACKS
     
    292292}
    293293
    294 void aubio_fft_rdo_complex(aubio_fft_t * s, fvec_t * compspec, fvec_t * output) {
     294void aubio_fft_rdo_complex(aubio_fft_t * s, const fvec_t * compspec, fvec_t * output) {
    295295  uint_t i;
    296296#ifdef HAVE_FFTW3
     
    347347}
    348348
    349 void aubio_fft_get_spectrum(fvec_t * compspec, cvec_t * spectrum) {
     349void aubio_fft_get_spectrum(const fvec_t * compspec, cvec_t * spectrum) {
    350350  aubio_fft_get_phas(compspec, spectrum);
    351351  aubio_fft_get_norm(compspec, spectrum);
    352352}
    353353
    354 void aubio_fft_get_realimag(cvec_t * spectrum, fvec_t * compspec) {
     354void aubio_fft_get_realimag(const cvec_t * spectrum, fvec_t * compspec) {
    355355  aubio_fft_get_imag(spectrum, compspec);
    356356  aubio_fft_get_real(spectrum, compspec);
    357357}
    358358
    359 void aubio_fft_get_phas(fvec_t * compspec, cvec_t * spectrum) {
     359void aubio_fft_get_phas(const fvec_t * compspec, cvec_t * spectrum) {
    360360  uint_t i;
    361361  if (compspec->data[0] < 0) {
     
    375375}
    376376
    377 void aubio_fft_get_norm(fvec_t * compspec, cvec_t * spectrum) {
     377void aubio_fft_get_norm(const fvec_t * compspec, cvec_t * spectrum) {
    378378  uint_t i = 0;
    379379  spectrum->norm[0] = ABS(compspec->data[0]);
     
    386386}
    387387
    388 void aubio_fft_get_imag(cvec_t * spectrum, fvec_t * compspec) {
     388void aubio_fft_get_imag(const cvec_t * spectrum, fvec_t * compspec) {
    389389  uint_t i;
    390390  for (i = 1; i < ( compspec->length + 1 ) / 2 /*- 1 + 1*/; i++) {
     
    394394}
    395395
    396 void aubio_fft_get_real(cvec_t * spectrum, fvec_t * compspec) {
     396void aubio_fft_get_real(const cvec_t * spectrum, fvec_t * compspec) {
    397397  uint_t i;
    398398  for (i = 0; i < compspec->length / 2 + 1; i++) {
Note: See TracChangeset for help on using the changeset viewer.