Changeset ac5f22c for src


Ignore:
Timestamp:
Nov 3, 2007, 7:03:58 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:
b1c948b
Parents:
2d8880d5
Message:

src/fft.c: fix norm computation when HAVE_COMPLEX_H is undefined

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/fft.c

    r2d8880d5 rac5f22c  
    121121void aubio_fft_getnorm(smpl_t * norm, fft_data_t * spectrum, uint_t size) {
    122122  uint_t i;
    123   norm[0] = SQR(spectrum[0]);
    124   for (i=1;i<size/2;i++) norm[i] = (SQR(spectrum[i]) + SQR(spectrum[size-i]));
    125   norm[size/2] = SQR(spectrum[size/2]);
     123  norm[0] = spectrum[0];
     124  for (i=1;i<size/2;i++) norm[i] = SQRT((SQR(spectrum[i]) + SQR(spectrum[size-i])));
     125  norm[size/2] = spectrum[size/2];
    126126}
    127127
Note: See TracChangeset for help on using the changeset viewer.