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

Unified Diff: webrtc/modules/audio_processing/rms_level.cc

Issue 2320053003: webrtc/modules/audio_processing: Use RTC_DCHECK() instead of assert() (Closed)
Patch Set: rebase Created 4 years, 3 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
Index: webrtc/modules/audio_processing/rms_level.cc
diff --git a/webrtc/modules/audio_processing/rms_level.cc b/webrtc/modules/audio_processing/rms_level.cc
index 70c4422d34bae2c5f9542162da6b2d98a65f01de..957a7b5839b9d607f5120567d2b67939333cdc2e 100644
--- a/webrtc/modules/audio_processing/rms_level.cc
+++ b/webrtc/modules/audio_processing/rms_level.cc
@@ -10,9 +10,10 @@
#include "webrtc/modules/audio_processing/rms_level.h"
-#include <assert.h>
#include <math.h>
+#include "webrtc/base/checks.h"
+
namespace webrtc {
static const float kMaxSquaredLevel = 32768 * 32768;
@@ -49,7 +50,7 @@ int RMSLevel::RMS() {
float rms = sum_square_ / (sample_count_ * kMaxSquaredLevel);
// 20log_10(x^0.5) = 10log_10(x)
rms = 10 * log10(rms);
- assert(rms <= 0);
+ RTC_DCHECK_LE(rms, 0);
if (rms < -kMinLevel)
rms = -kMinLevel;
« no previous file with comments | « webrtc/modules/audio_processing/gain_control_impl.cc ('k') | webrtc/modules/audio_processing/transient/transient_detector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698