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

Unified Diff: webrtc/modules/audio_processing/vad/standalone_vad.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/vad/standalone_vad.cc
diff --git a/webrtc/modules/audio_processing/vad/standalone_vad.cc b/webrtc/modules/audio_processing/vad/standalone_vad.cc
index 1209526a92e6268e43ce6c66c8214b3be66137d9..8636eb487f10f4a0e999ebd1f529900f241d07d4 100644
--- a/webrtc/modules/audio_processing/vad/standalone_vad.cc
+++ b/webrtc/modules/audio_processing/vad/standalone_vad.cc
@@ -10,8 +10,7 @@
#include "webrtc/modules/audio_processing/vad/standalone_vad.h"
-#include <assert.h>
-
+#include "webrtc/base/checks.h"
#include "webrtc/modules/include/module_common_types.h"
#include "webrtc/modules/utility/include/audio_frame_operations.h"
#include "webrtc/typedefs.h"
@@ -64,7 +63,7 @@ int StandaloneVad::GetActivity(double* p, size_t length_p) {
const size_t num_frames = index_ / kLength10Ms;
if (num_frames > length_p)
return -1;
- assert(WebRtcVad_ValidRateAndFrameLength(kSampleRateHz, index_) == 0);
+ RTC_DCHECK_EQ(0, WebRtcVad_ValidRateAndFrameLength(kSampleRateHz, index_));
int activity = WebRtcVad_Process(vad_, kSampleRateHz, buffer_, index_);
if (activity < 0)
« no previous file with comments | « webrtc/modules/audio_processing/vad/pitch_based_vad.cc ('k') | webrtc/modules/audio_processing/vad/vad_audio_proc.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698