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

Unified Diff: webrtc/modules/audio_coding/neteq/audio_decoder_unittest.cc

Issue 2024633002: AudioDecoder: New method SampleRateHz, + implementations for our codecs (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
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 1d0802e441ed7c9c1db7e3a8b2fdbf59f9442f7a..cb0647a16bbbf869712e96a6bc2dbbf1a809de67 100644
--- a/webrtc/modules/audio_coding/neteq/audio_decoder_unittest.cc
+++ b/webrtc/modules/audio_coding/neteq/audio_decoder_unittest.cc
@@ -283,7 +283,7 @@ class AudioDecoderPcmUTest : public AudioDecoderTest {
AudioDecoderPcmUTest() : AudioDecoderTest() {
frame_size_ = 160;
data_length_ = 10 * frame_size_;
- decoder_ = new AudioDecoderPcmU(1);
+ decoder_ = new AudioDecoderPcmU(8000, 1);
AudioEncoderPcmU::Config config;
config.frame_size_ms = static_cast<int>(frame_size_ / 8);
config.payload_type = payload_type_;
@@ -296,7 +296,7 @@ class AudioDecoderPcmATest : public AudioDecoderTest {
AudioDecoderPcmATest() : AudioDecoderTest() {
frame_size_ = 160;
data_length_ = 10 * frame_size_;
- decoder_ = new AudioDecoderPcmA(1);
+ decoder_ = new AudioDecoderPcmA(8000, 1);
AudioEncoderPcmA::Config config;
config.frame_size_ms = static_cast<int>(frame_size_ / 8);
config.payload_type = payload_type_;
@@ -310,7 +310,7 @@ class AudioDecoderPcm16BTest : public AudioDecoderTest {
codec_input_rate_hz_ = 16000;
frame_size_ = 20 * codec_input_rate_hz_ / 1000;
data_length_ = 10 * frame_size_;
- decoder_ = new AudioDecoderPcm16B(1);
+ decoder_ = new AudioDecoderPcm16B(codec_input_rate_hz_, 1);
assert(decoder_);
AudioEncoderPcm16B::Config config;
config.sample_rate_hz = codec_input_rate_hz_;
@@ -370,7 +370,7 @@ class AudioDecoderIsacFloatTest : public AudioDecoderTest {
config.frame_size_ms =
1000 * static_cast<int>(frame_size_) / codec_input_rate_hz_;
audio_encoder_.reset(new AudioEncoderIsac(config));
- decoder_ = new AudioDecoderIsac();
+ decoder_ = new AudioDecoderIsac(codec_input_rate_hz_);
}
};
@@ -387,7 +387,7 @@ class AudioDecoderIsacSwbTest : public AudioDecoderTest {
config.frame_size_ms =
1000 * static_cast<int>(frame_size_) / codec_input_rate_hz_;
audio_encoder_.reset(new AudioEncoderIsac(config));
- decoder_ = new AudioDecoderIsac();
+ decoder_ = new AudioDecoderIsac(codec_input_rate_hz_);
}
};
@@ -404,7 +404,7 @@ class AudioDecoderIsacFixTest : public AudioDecoderTest {
config.frame_size_ms =
1000 * static_cast<int>(frame_size_) / codec_input_rate_hz_;
audio_encoder_.reset(new AudioEncoderIsacFix(config));
- decoder_ = new AudioDecoderIsacFix();
+ decoder_ = new AudioDecoderIsacFix(codec_input_rate_hz_);
}
};

Powered by Google App Engine
This is Rietveld 408576698