Bug 135986
Summary: | wrong normalization in RealtimeAnalyser.cpp | ||
---|---|---|---|
Product: | WebKit | Reporter: | wothke <info> |
Component: | Web Audio | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED DUPLICATE | ||
Severity: | Normal | CC: | crogers |
Priority: | P2 | ||
Version: | 528+ (Nightly build) | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
URL: | In order to understand the idiotic differences between the data ranges of the AnalyzerNode's getFloatFrequencyData() and getByteFrequencyData() APIs I finally found myself analyzing the WebKit sources: https://github.com/WebKit/webkit/blob/master/Source/WebCore/Modules/webaudio/RealtimeAnalyser.cpp |
wothke
In order to understand the idiotic differences between the data ranges of the AnalyzerNode's getFloatFrequencyData() and getByteFrequencyData() APIs I finally found myself analyzing the WebKit sources: https://github.com/WebKit/webkit/blob/master/Source/WebCore/Modules/webaudio/RealtimeAnalyser.cpp
What surprises me there is the:
const double magnitudeScale = 1.0 / DefaultFFTSize;
which is used to normalize the FFT results (see RealtimeAnalyser::doFFTAnalysis()).
I am not an expert on FFT but I think the correct scaling factor rather be: 2/actualFftSize
Also it seems that the respective code has actually been fixed in Chromium! see chromium\src\third_party\WebKit\Source\modules\webaudio
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Alexey Proskuryakov
*** This bug has been marked as a duplicate of bug 136120 ***