[Webkit-unassigned] [Bug 135986] New: wrong normalization in RealtimeAnalyser.cpp

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Aug 15 11:09:44 PDT 2014


https://bugs.webkit.org/show_bug.cgi?id=135986

           Summary: wrong normalization in RealtimeAnalyser.cpp
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: 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/We
                    bCore/Modules/webaudio/RealtimeAnalyser.cpp
        OS/Version: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: WebKit Misc.
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: info at wothke.ch


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

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list