RESOLVED DUPLICATE of bug 136120 135986
wrong normalization in RealtimeAnalyser.cpp
https://bugs.webkit.org/show_bug.cgi?id=135986
Summary wrong normalization in RealtimeAnalyser.cpp
wothke
Reported 2014-08-15 11:09:53 PDT
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
Alexey Proskuryakov
Comment 1 2014-08-20 17:54:04 PDT
*** This bug has been marked as a duplicate of bug 136120 ***
Note You need to log in before you can comment on or make changes to this bug.