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

Unified Diff: webrtc/common_audio/resampler/push_resampler.cc

Issue 2014973002: Reland 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: Refine ifdefs to affect the win clang bot only 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 | « no previous file | webrtc/common_audio/resampler/push_resampler_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/common_audio/resampler/push_resampler.cc
diff --git a/webrtc/common_audio/resampler/push_resampler.cc b/webrtc/common_audio/resampler/push_resampler.cc
index 9b8f38b140c2c67919e1a6fae9011758ee7f9122..b26774de2400554ce1ac33c7cfd28094d8e606a6 100644
--- a/webrtc/common_audio/resampler/push_resampler.cc
+++ b/webrtc/common_audio/resampler/push_resampler.cc
@@ -23,12 +23,18 @@ namespace {
// due to problems with clang on Windows in debug builds.
// For some reason having the DCHECKs inline in the template code
// caused the compiler to generate code that threw off the linker.
+// TODO(tommi): Re-enable when we've figured out what the problem is.
+// http://crbug.com/615050
void CheckValidInitParams(int src_sample_rate_hz, int dst_sample_rate_hz,
size_t num_channels) {
+// The below checks are temporarily disabled on WEBRTC_WIN due to problems
+// with clang debug builds.
+#if !defined(WEBRTC_WIN) && defined(__clang__) && !defined(NDEBUG)
RTC_DCHECK_GT(src_sample_rate_hz, 0);
RTC_DCHECK_GT(dst_sample_rate_hz, 0);
RTC_DCHECK_GT(num_channels, 0u);
RTC_DCHECK_LE(num_channels, 2u);
+#endif
}
void CheckExpectedBufferSizes(size_t src_length,
@@ -36,10 +42,16 @@ void CheckExpectedBufferSizes(size_t src_length,
size_t num_channels,
int src_sample_rate,
int dst_sample_rate) {
+// The below checks are temporarily disabled on WEBRTC_WIN due to problems
+// with clang debug builds.
+// TODO(tommi): Re-enable when we've figured out what the problem is.
+// http://crbug.com/615050
+#if !defined(WEBRTC_WIN) && defined(__clang__) && !defined(NDEBUG)
const size_t src_size_10ms = src_sample_rate * num_channels / 100;
const size_t dst_size_10ms = dst_sample_rate * num_channels / 100;
RTC_CHECK_EQ(src_length, src_size_10ms);
RTC_CHECK_GE(dst_capacity, dst_size_10ms);
+#endif
}
}
« no previous file with comments | « no previous file | webrtc/common_audio/resampler/push_resampler_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698