Bug 135986

Summary: wrong normalization in RealtimeAnalyser.cpp
Product: WebKit Reporter: wothke <info>
Component: Web AudioAssignee: 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
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.