Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2293)

Unified Diff: Source/modules/webaudio/RealtimeAnalyser.cpp

Issue 156993002: Use correct FFT scaling for WebAudio AnalyserNode (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « LayoutTests/webaudio/realtimeanalyser-fft-scaling-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/webaudio/RealtimeAnalyser.cpp
diff --git a/Source/modules/webaudio/RealtimeAnalyser.cpp b/Source/modules/webaudio/RealtimeAnalyser.cpp
index 4d9cb8e9d84c0457e1ca67df617b66fbd2cab4ee..24d7b729cabe902441ddda2c9099e0677199e03f 100644
--- a/Source/modules/webaudio/RealtimeAnalyser.cpp
+++ b/Source/modules/webaudio/RealtimeAnalyser.cpp
@@ -178,7 +178,7 @@ void RealtimeAnalyser::doFFTAnalysis()
imagP[0] = 0;
// Normalize so than an input sine wave at 0dBfs registers as 0dBfs (undo FFT scaling factor).
- const double magnitudeScale = 1.0 / DefaultFFTSize;
+ const double magnitudeScale = 1.0 / fftSize;
// A value of 0 does no averaging with the previous result. Larger values produce slower, but smoother changes.
double k = m_smoothingTimeConstant;
« no previous file with comments | « LayoutTests/webaudio/realtimeanalyser-fft-scaling-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698