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

Unified Diff: third_party/WebKit/Source/platform/audio/AudioUtilities.cpp

Issue 1729783002: Don't clip FFT output values to minDecibels. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 | « third_party/WebKit/Source/modules/webaudio/RealtimeAnalyser.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/platform/audio/AudioUtilities.cpp
diff --git a/third_party/WebKit/Source/platform/audio/AudioUtilities.cpp b/third_party/WebKit/Source/platform/audio/AudioUtilities.cpp
index e716d6ca6566fea465d5dbd84f916ff8b42f0f91..f162c6be9079d852a87351ac80e4471417bbf4e3 100644
--- a/third_party/WebKit/Source/platform/audio/AudioUtilities.cpp
+++ b/third_party/WebKit/Source/platform/audio/AudioUtilities.cpp
@@ -37,11 +37,7 @@ float decibelsToLinear(float decibels)
float linearToDecibels(float linear)
{
- // It's not possible to calculate decibels for a zero linear value since it would be -Inf.
- // -1000.0 dB represents a very tiny linear value in case we ever reach this case.
- ASSERT(linear);
- if (!linear)
- return -1000;
+ ASSERT(linear >= 0);
return 20 * log10f(linear);
}
« no previous file with comments | « third_party/WebKit/Source/modules/webaudio/RealtimeAnalyser.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698