mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
b=865241 don't try to compute a phase for group delay from the DC and nyquist components of the DFT r=ehsan
Given imagP[0] is really realP[halfSize], it doesn't make sense to calculate a phase from placing the DC and Nyquist components in different directions. The DC component doesn't have a phase offset and lastPhase is already initialized to zero. This makes extractAverageGroupDelay() consistent with addConstantGroupDelay() and to some extent interpolateFrequencyComponents(). The effect of the bug would have been small for reasonably sized FFTs. --HG-- extra : rebase_source : b2931d625bd7e014f123b576f28aad7f719c585d
This commit is contained in:
parent
b03713d218
commit
c312f43e8d
@ -193,7 +193,7 @@ double FFTFrame::extractAverageGroupDelay()
|
||||
const double kSamplePhaseDelay = (2.0 * piDouble) / double(fftSize());
|
||||
|
||||
// Calculate weighted average group delay
|
||||
for (int i = 0; i < halfSize; i++) {
|
||||
for (int i = 1; i < halfSize; i++) {
|
||||
Complex c(realP[i], imagP[i]);
|
||||
double mag = abs(c);
|
||||
double phase = arg(c);
|
||||
|
Loading…
Reference in New Issue
Block a user