webrtc/modules/audio_processing: Use RTC_DCHECK() instead of assert()
Review-Url: https://codereview.webrtc.org/2320053003 Cr-Commit-Position: refs/heads/master@{#14211}
This commit is contained in:
@ -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;
|
||||
|
||||
|
Reference in New Issue
Block a user