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

Unified Diff: webrtc/modules/audio_coding/neteq/audio_decoder_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/neteq/audio_decoder_unittest.cc
diff --git a/webrtc/modules/audio_coding/neteq/audio_decoder_unittest.cc b/webrtc/modules/audio_coding/neteq/audio_decoder_unittest.cc
index a2ef9d1cb1e87f0ee05647301b7806d279637c7e..392e3dccd3e5f529898940633da2d6b19fbc98d1 100644
--- a/webrtc/modules/audio_coding/neteq/audio_decoder_unittest.cc
+++ b/webrtc/modules/audio_coding/neteq/audio_decoder_unittest.cc
@@ -171,7 +171,6 @@ class AudioDecoderTest : public ::testing::Test {
size_t processed_samples = 0u;
encoded_bytes_ = 0u;
InitEncoder();
- EXPECT_EQ(0, decoder_->Init());
std::vector<int16_t> input;
std::vector<int16_t> decoded;
while (processed_samples + frame_size_ <= data_length_) {
@@ -220,7 +219,7 @@ class AudioDecoderTest : public ::testing::Test {
size_t enc_len = EncodeFrame(input.get(), frame_size_, encoded_);
size_t dec_len;
AudioDecoder::SpeechType speech_type1, speech_type2;
- EXPECT_EQ(0, decoder_->Init());
+ decoder_->Reset();
rtc::scoped_ptr<int16_t[]> output1(new int16_t[frame_size_ * channels_]);
dec_len = decoder_->Decode(encoded_, enc_len, codec_input_rate_hz_,
frame_size_ * channels_ * sizeof(int16_t),
@@ -228,7 +227,7 @@ class AudioDecoderTest : public ::testing::Test {
ASSERT_LE(dec_len, frame_size_ * channels_);
EXPECT_EQ(frame_size_ * channels_, dec_len);
// Re-init decoder and decode again.
- EXPECT_EQ(0, decoder_->Init());
+ decoder_->Reset();
rtc::scoped_ptr<int16_t[]> output2(new int16_t[frame_size_ * channels_]);
dec_len = decoder_->Decode(encoded_, enc_len, codec_input_rate_hz_,
frame_size_ * channels_ * sizeof(int16_t),
@@ -249,7 +248,7 @@ class AudioDecoderTest : public ::testing::Test {
input_audio_.Read(frame_size_, codec_input_rate_hz_, input.get()));
size_t enc_len = EncodeFrame(input.get(), frame_size_, encoded_);
AudioDecoder::SpeechType speech_type;
- EXPECT_EQ(0, decoder_->Init());
+ decoder_->Reset();
rtc::scoped_ptr<int16_t[]> output(new int16_t[frame_size_ * channels_]);
size_t dec_len = decoder_->Decode(encoded_, enc_len, codec_input_rate_hz_,
frame_size_ * channels_ * sizeof(int16_t),
@@ -341,7 +340,7 @@ class AudioDecoderIlbcTest : public AudioDecoderTest {
input_audio_.Read(frame_size_, codec_input_rate_hz_, input.get()));
size_t enc_len = EncodeFrame(input.get(), frame_size_, encoded_);
AudioDecoder::SpeechType speech_type;
- EXPECT_EQ(0, decoder_->Init());
+ decoder_->Reset();
rtc::scoped_ptr<int16_t[]> output(new int16_t[frame_size_ * channels_]);
size_t dec_len = decoder_->Decode(encoded_, enc_len, codec_input_rate_hz_,
frame_size_ * channels_ * sizeof(int16_t),
« no previous file with comments | « webrtc/modules/audio_coding/neteq/audio_decoder_impl.cc ('k') | webrtc/modules/audio_coding/neteq/decoder_database.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698