Delay Estimator: robust_validation should be stored over a reset
BUG=None TESTED=modules_unittests, trybots R=aluebs@webrtc.org, andrew@webrtc.org Review URL: https://webrtc-codereview.appspot.com/5959004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@5337 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
@ -362,6 +362,7 @@ BinaryDelayEstimator* WebRtc_CreateBinaryDelayEstimator(
|
||||
|
||||
self->farend = farend;
|
||||
self->near_history_size = lookahead + 1;
|
||||
self->robust_validation_enabled = 0; // Disabled by default.
|
||||
|
||||
// Allocate memory for spectrum buffers. The extra array element in
|
||||
// |mean_bit_counts| and |histogram| is a dummy element only used while
|
||||
@ -406,7 +407,6 @@ void WebRtc_InitBinaryDelayEstimator(BinaryDelayEstimator* self) {
|
||||
// Default return value if we're unable to estimate. -1 is used for errors.
|
||||
self->last_delay = -2;
|
||||
|
||||
self->robust_validation_enabled = 0; // Disabled by default.
|
||||
self->last_candidate_delay = -2;
|
||||
self->compare_delay = self->farend->history_size;
|
||||
self->candidate_hits = 0;
|
||||
|
||||
@ -295,12 +295,14 @@ TEST_F(DelayEstimatorTest, CorrectErrorReturnsOfWrapper) {
|
||||
}
|
||||
|
||||
TEST_F(DelayEstimatorTest, VerifyEnableRobustValidation) {
|
||||
Init();
|
||||
// Disabled by default.
|
||||
EXPECT_EQ(0, WebRtc_is_robust_validation_enabled(handle_));
|
||||
// Unaffected over a reset
|
||||
for (int i = 1; i >= 0; i--) {
|
||||
EXPECT_EQ(0, WebRtc_enable_robust_validation(handle_, i));
|
||||
EXPECT_EQ(i, WebRtc_is_robust_validation_enabled(handle_));
|
||||
Init();
|
||||
EXPECT_EQ(i, WebRtc_is_robust_validation_enabled(handle_));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user