Changeset 41ed384


Ignore:
Timestamp:
Dec 1, 2007, 7:16:56 PM (13 years ago)
Author:
Paul Brossier <piem@piem.org>
Branches:
feature/autosink, feature/constantq, feature/pitchshift, feature/pydocstrings, feature/timestretch, master, pitchshift, sampler, timestretch, yinfft+
Children:
0380645
Parents:
974dddc
Message:

fft.c: if real part is zero, have phase = 0

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/spectral/fft.c

    r974dddc r41ed384  
    155155    spectrum->phas[i][0] = 0.;
    156156    for (j=1; j < spectrum->length - 1; j++) {
     157      if (compspec->data[i][j] == 0.) spectrum->phas[i][j] = 0;
     158      else
    157159      spectrum->phas[i][j] = atan2f(compspec->data[i][compspec->length-j],
    158160          compspec->data[i][j]);
Note: See TracChangeset for help on using the changeset viewer.