comparison layer/SpectrogramLayer.cpp @ 142:40a47de69559

...
author Chris Cannam
date Thu, 14 Sep 2006 11:20:09 +0000
parents 0f1ac9562c76
children aaa3a53dbb10
comparison
equal deleted inserted replaced
141:48d19f278b15 142:40a47de69559
1112 float expectedPhase = 1112 float expectedPhase =
1113 oldPhase + (2.0 * M_PI * bin * windowIncrement) / windowSize; 1113 oldPhase + (2.0 * M_PI * bin * windowIncrement) / windowSize;
1114 1114
1115 float phaseError = princargf(newPhase - expectedPhase); 1115 float phaseError = princargf(newPhase - expectedPhase);
1116 1116
1117 if (fabs(phaseError) < (1.1 * (windowIncrement * M_PI) / windowSize)) { 1117 if (fabsf(phaseError) < (1.1f * (windowIncrement * M_PI) / windowSize)) {
1118 1118
1119 // The new frequency estimate based on the phase error 1119 // The new frequency estimate based on the phase error
1120 // resulting from assuming the "native" frequency of this bin 1120 // resulting from assuming the "native" frequency of this bin
1121 1121
1122 float newFrequency = 1122 float newFrequency =