summaryrefslogtreecommitdiffstats
path: root/content
diff options
context:
space:
mode:
Diffstat (limited to 'content')
-rw-r--r--content/browser/speech/endpointer/energy_endpointer.cc7
1 files changed, 3 insertions, 4 deletions
diff --git a/content/browser/speech/endpointer/energy_endpointer.cc b/content/browser/speech/endpointer/energy_endpointer.cc
index edf3edd..39cf617 100644
--- a/content/browser/speech/endpointer/energy_endpointer.cc
+++ b/content/browser/speech/endpointer/energy_endpointer.cc
@@ -34,10 +34,9 @@ int64 Secs2Usecs(float seconds) {
}
float GetDecibel(float value) {
- const float kVerySmallValue = 1.0e-100f;
- if (value < kVerySmallValue)
- value = kVerySmallValue;
- return 20 * log10(value);
+ if (value > 1.0e-100)
+ return 20 * log10(value);
+ return -2000.0;
}
} // namespace