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

Unified Diff: webrtc/modules/audio_coding/codecs/cng/cng_unittest.cc

Issue 1319683002: AudioDecoder: Replace Init() with Reset() (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@buffer
Patch Set: review fixes Created 5 years, 4 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_coding/codecs/cng/cng_unittest.cc
diff --git a/webrtc/modules/audio_coding/codecs/cng/cng_unittest.cc b/webrtc/modules/audio_coding/codecs/cng/cng_unittest.cc
index 24095402e5f79ea4720b5610246277031e86a28f..1061dca69aca4d37326601ebb9571ef0d5511f97 100644
--- a/webrtc/modules/audio_coding/codecs/cng/cng_unittest.cc
+++ b/webrtc/modules/audio_coding/codecs/cng/cng_unittest.cc
@@ -194,7 +194,7 @@ TEST_F(CngTest, CngUpdateSid) {
EXPECT_EQ(0, WebRtcCng_CreateDec(&cng_dec_inst_));
EXPECT_EQ(0, WebRtcCng_InitEnc(cng_enc_inst_, 16000, kSidNormalIntervalUpdate,
kCNGNumParamsNormal));
- EXPECT_EQ(0, WebRtcCng_InitDec(cng_dec_inst_));
+ WebRtcCng_InitDec(cng_dec_inst_);
// Run normal Encode and UpdateSid.
EXPECT_EQ(kCNGNumParamsNormal + 1, WebRtcCng_Encode(
@@ -205,7 +205,7 @@ TEST_F(CngTest, CngUpdateSid) {
// Reinit with new length.
EXPECT_EQ(0, WebRtcCng_InitEnc(cng_enc_inst_, 16000, kSidNormalIntervalUpdate,
kCNGNumParamsHigh));
- EXPECT_EQ(0, WebRtcCng_InitDec(cng_dec_inst_));
+ WebRtcCng_InitDec(cng_dec_inst_);
// Expect 0 because of unstable parameters after switching length.
EXPECT_EQ(0, WebRtcCng_Encode(cng_enc_inst_, speech_data_, 160, sid_data,
@@ -242,7 +242,7 @@ TEST_F(CngTest, CngUpdateSidErroneous) {
EXPECT_EQ(6220, WebRtcCng_GetErrorCodeDec(cng_dec_inst_));
// Initialize decoder.
- EXPECT_EQ(0, WebRtcCng_InitDec(cng_dec_inst_));
+ WebRtcCng_InitDec(cng_dec_inst_);
// First run with valid parameters, then with too many CNG parameters.
// The function will operate correctly by only reading the maximum number of
@@ -268,7 +268,7 @@ TEST_F(CngTest, CngGenerate) {
EXPECT_EQ(0, WebRtcCng_CreateDec(&cng_dec_inst_));
EXPECT_EQ(0, WebRtcCng_InitEnc(cng_enc_inst_, 16000, kSidNormalIntervalUpdate,
kCNGNumParamsNormal));
- EXPECT_EQ(0, WebRtcCng_InitDec(cng_dec_inst_));
+ WebRtcCng_InitDec(cng_dec_inst_);
// Normal Encode.
EXPECT_EQ(kCNGNumParamsNormal + 1, WebRtcCng_Encode(
@@ -301,7 +301,7 @@ TEST_F(CngTest, CngAutoSid) {
EXPECT_EQ(0, WebRtcCng_CreateDec(&cng_dec_inst_));
EXPECT_EQ(0, WebRtcCng_InitEnc(cng_enc_inst_, 16000, kSidNormalIntervalUpdate,
kCNGNumParamsNormal));
- EXPECT_EQ(0, WebRtcCng_InitDec(cng_dec_inst_));
+ WebRtcCng_InitDec(cng_dec_inst_);
// Normal Encode, 100 msec, where no SID data should be generated.
for (int i = 0; i < 10; i++) {
@@ -328,7 +328,7 @@ TEST_F(CngTest, CngAutoSidShort) {
EXPECT_EQ(0, WebRtcCng_CreateDec(&cng_dec_inst_));
EXPECT_EQ(0, WebRtcCng_InitEnc(cng_enc_inst_, 16000, kSidShortIntervalUpdate,
kCNGNumParamsNormal));
- EXPECT_EQ(0, WebRtcCng_InitDec(cng_dec_inst_));
+ WebRtcCng_InitDec(cng_dec_inst_);
// First call will never generate SID, unless forced to.
EXPECT_EQ(0, WebRtcCng_Encode(cng_enc_inst_, speech_data_, 160, sid_data,
« no previous file with comments | « webrtc/modules/audio_coding/codecs/audio_decoder.h ('k') | webrtc/modules/audio_coding/codecs/cng/include/webrtc_cng.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698