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

Unified Diff: webrtc/voice_engine/utility.cc

Issue 2018553002: Revert of Adding a some checks and switching out a few assert for RTC_[D]CHECK. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 7 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 | « webrtc/voice_engine/test/auto_test/standard/external_media_test.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/voice_engine/utility.cc
diff --git a/webrtc/voice_engine/utility.cc b/webrtc/voice_engine/utility.cc
index 37e12cea4f6aff97c8b426b9d0f2e2d7979fb839..605e55369e3d4a31666e17bf69d3b04ccd054630 100644
--- a/webrtc/voice_engine/utility.cc
+++ b/webrtc/voice_engine/utility.cc
@@ -10,7 +10,6 @@
#include "webrtc/voice_engine/utility.h"
-#include "webrtc/base/checks.h"
#include "webrtc/base/logging.h"
#include "webrtc/common_audio/resampler/include/push_resampler.h"
#include "webrtc/common_audio/signal_processing/include/signal_processing_library.h"
@@ -53,18 +52,21 @@
if (resampler->InitializeIfNeeded(sample_rate_hz, dst_frame->sample_rate_hz_,
audio_ptr_num_channels) == -1) {
- FATAL() << "InitializeIfNeeded failed: sample_rate_hz = " << sample_rate_hz
- << ", dst_frame->sample_rate_hz_ = " << dst_frame->sample_rate_hz_
- << ", audio_ptr_num_channels = " << audio_ptr_num_channels;
+ LOG(LS_ERROR) << "InitializeIfNeeded failed: sample_rate_hz = "
+ << sample_rate_hz << ", dst_frame->sample_rate_hz_ = "
+ << dst_frame->sample_rate_hz_
+ << ", audio_ptr_num_channels = " << audio_ptr_num_channels;
+ assert(false);
}
const size_t src_length = samples_per_channel * audio_ptr_num_channels;
int out_length = resampler->Resample(audio_ptr, src_length, dst_frame->data_,
AudioFrame::kMaxDataSizeSamples);
if (out_length == -1) {
- FATAL() << "Resample failed: audio_ptr = " << audio_ptr
- << ", src_length = " << src_length
- << ", dst_frame->data_ = " << dst_frame->data_;
+ LOG(LS_ERROR) << "Resample failed: audio_ptr = " << audio_ptr
+ << ", src_length = " << src_length
+ << ", dst_frame->data_ = " << dst_frame->data_;
+ assert(false);
}
dst_frame->samples_per_channel_ = out_length / audio_ptr_num_channels;
@@ -82,10 +84,8 @@
const int16_t source[],
size_t source_channel,
size_t source_len) {
- RTC_DCHECK_GE(target_channel, 1u);
- RTC_DCHECK_LE(target_channel, 2u);
- RTC_DCHECK_GE(source_channel, 1u);
- RTC_DCHECK_LE(source_channel, 2u);
+ assert(target_channel == 1 || target_channel == 2);
+ assert(source_channel == 1 || source_channel == 2);
if (target_channel == 2 && source_channel == 1) {
// Convert source from mono to stereo.
« no previous file with comments | « webrtc/voice_engine/test/auto_test/standard/external_media_test.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698