projects
/
aubio.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
76fc277
)
src/spectral/fft.c: do not zero phase for no good reason, use ATAN2 macro
author
Paul Brossier
<piem@piem.org>
Sun, 11 Oct 2009 10:37:01 +0000
(12:37 +0200)
committer
Paul Brossier
<piem@piem.org>
Sun, 11 Oct 2009 10:37:01 +0000
(12:37 +0200)
src/spectral/fft.c
patch
|
blob
|
history
diff --git
a/src/spectral/fft.c
b/src/spectral/fft.c
index 7814b3017f5d649294f96d5badd46b21daacfaa0..2aea246dd29bc6841d3828d7ee1d4fcd148adb77 100644
(file)
--- a/
src/spectral/fft.c
+++ b/
src/spectral/fft.c
@@
-185,9
+185,7
@@
void aubio_fft_get_phas(fvec_t * compspec, cvec_t * spectrum) {
for (i = 0; i < spectrum->channels; i++) {
spectrum->phas[i][0] = 0.;
for (j=1; j < spectrum->length - 1; j++) {
- if (compspec->data[i][j] == 0.) spectrum->phas[i][j] = 0;
- else
- spectrum->phas[i][j] = atan2f(compspec->data[i][compspec->length-j],
+ spectrum->phas[i][j] = ATAN2(compspec->data[i][compspec->length-j],
compspec->data[i][j]);
}
spectrum->phas[i][spectrum->length-1] = 0.;