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

Unified Diff: webrtc/modules/audio_coding/codecs/audio_decoder_factory_unittest.cc

Issue 2068133002: Audio decoder factory test: Ensure that g722's sample rate is 16 kHz, not 8 kHz (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 6 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/audio_coding/codecs/audio_decoder_factory_unittest.cc
diff --git a/webrtc/modules/audio_coding/codecs/audio_decoder_factory_unittest.cc b/webrtc/modules/audio_coding/codecs/audio_decoder_factory_unittest.cc
index 50503dd13f25f77d3214857c2f35cf5f5cc69d12..9b5336927d728462d9ddb823c647c78b8be9373f 100644
--- a/webrtc/modules/audio_coding/codecs/audio_decoder_factory_unittest.cc
+++ b/webrtc/modules/audio_coding/codecs/audio_decoder_factory_unittest.cc
@@ -55,12 +55,6 @@ TEST(AudioDecoderFactoryTest, CreateIlbc) {
EXPECT_TRUE(adf->MakeAudioDecoder(SdpAudioFormat("ilbc", 8000, 1)));
EXPECT_FALSE(adf->MakeAudioDecoder(SdpAudioFormat("ilbc", 8000, 2)));
EXPECT_FALSE(adf->MakeAudioDecoder(SdpAudioFormat("ilbc", 16000, 1)));
-
- // iLBC actually uses a 16 kHz sample rate instead of the nominal 8 kHz.
- // TODO(kwiberg): Uncomment this once AudioDecoder has a SampleRateHz method.
- // std::unique_ptr<AudioDecoder> dec =
- // adf->MakeAudioDecoder(SdpAudioFormat("ilbc", 8000, 1));
- // EXPECT_EQ(16000, dec->SampleRateHz());
}
TEST(AudioDecoderFactoryTest, CreateIsac) {
@@ -108,6 +102,11 @@ TEST(AudioDecoderFactoryTest, CreateG722) {
EXPECT_FALSE(adf->MakeAudioDecoder(SdpAudioFormat("g722", 8000, 3)));
EXPECT_FALSE(adf->MakeAudioDecoder(SdpAudioFormat("g722", 16000, 1)));
EXPECT_FALSE(adf->MakeAudioDecoder(SdpAudioFormat("g722", 32000, 1)));
+
+ // g722 actually uses a 16 kHz sample rate instead of the nominal 8 kHz.
+ std::unique_ptr<AudioDecoder> dec =
+ adf->MakeAudioDecoder(SdpAudioFormat("g722", 8000, 1));
+ EXPECT_EQ(16000, dec->SampleRateHz());
}
TEST(AudioDecoderFactoryTest, CreateOpus) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698