Changeset 70585a5 for src/fft.c


Ignore:
Timestamp:
Nov 21, 2007, 4:53:13 PM (17 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:
66a1b955
Parents:
b050e8e (diff), 15b97d9 (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.
Message:

merge from main branch

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/fft.c

    rb050e8e r70585a5  
    4646  uint_t fft_size;
    4747  real_t *in, *out;
    48   fftw_plan   pfw, pbw;
     48  fftw_plan pfw, pbw;
    4949  fft_data_t * specdata;     /* complex spectral data */
    5050  fvec_t * compspec;
     
    6161  /* create plans */
    6262#ifdef HAVE_COMPLEX_H
    63   s->fft_size = winsize/2+1;
     63  s->fft_size = winsize/2 + 1;
    6464  s->specdata = (fft_data_t*)fftw_malloc(sizeof(fft_data_t)*s->fft_size);
    6565  s->pfw = fftw_plan_dft_r2c_1d(winsize, s->in,  s->specdata, FFTW_ESTIMATE);
     
    102102    }
    103103    fftw_execute(s->pfw);
    104 #if HAVE_COMPLEX_H
     104#ifdef HAVE_COMPLEX_H
    105105    compspec->data[i][0] = REAL(s->specdata[0]);
    106106    for (j = 1; j < s->fft_size -1 ; j++) {
     
    121121  const smpl_t renorm = 1./(smpl_t)s->winsize;
    122122  for (i = 0; i < compspec->channels; i++) {
    123 #if HAVE_COMPLEX_H
     123#ifdef HAVE_COMPLEX_H
    124124    s->specdata[0] = compspec->data[i][0];
    125125    for (j=1; j < s->fft_size - 1; j++) {
Note: See TracChangeset for help on using the changeset viewer.