Changeset 74a4865 for src/spectral/fft.c


Ignore:
Timestamp:
Oct 11, 2009, 12:47:43 PM (15 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:
202ffa5
Parents:
4f4299d
Message:

src/spectral/fft.c: fix imag boundaries, including for odd fft sizes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/spectral/fft.c

    r4f4299d r74a4865  
    225225  uint_t i, j;
    226226  for (i = 0; i < compspec->channels; i++) {
    227     for (j = 1; j < compspec->length / 2 + 1; j++) {
     227    for (j = 1; j < ( compspec->length + 1 ) / 2 /*- 1 + 1*/; j++) {
    228228      compspec->data[i][compspec->length - j] =
    229229        spectrum->norm[i][j]*SIN(spectrum->phas[i][j]);
     
    235235  uint_t i, j;
    236236  for (i = 0; i < compspec->channels; i++) {
    237     for (j = 0; j< compspec->length / 2 + 1; j++) {
     237    for (j = 0; j < compspec->length / 2 + 1; j++) {
    238238      compspec->data[i][j] =
    239239        spectrum->norm[i][j]*COS(spectrum->phas[i][j]);
Note: See TracChangeset for help on using the changeset viewer.