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

Unified Diff: webrtc/api/audio_codecs/test/audio_decoder_factory_template_unittest.cc

Issue 2996693002: iSAC fixed-point implementation of the Audio{En,De}coderFactoryTemplate APIs (Closed)
Patch Set: review comments Created 3 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/api/audio_codecs/test/audio_decoder_factory_template_unittest.cc
diff --git a/webrtc/api/audio_codecs/test/audio_decoder_factory_template_unittest.cc b/webrtc/api/audio_codecs/test/audio_decoder_factory_template_unittest.cc
index da261ac5b3a29c1ac2471b962b79293ea3873a5f..c27f24218b44605dd26edfdee9d0267b19ee6634 100644
--- a/webrtc/api/audio_codecs/test/audio_decoder_factory_template_unittest.cc
+++ b/webrtc/api/audio_codecs/test/audio_decoder_factory_template_unittest.cc
@@ -13,6 +13,7 @@
#include "webrtc/api/audio_codecs/g711/audio_decoder_g711.h"
#include "webrtc/api/audio_codecs/g722/audio_decoder_g722.h"
#include "webrtc/api/audio_codecs/ilbc/audio_decoder_ilbc.h"
+#include "webrtc/api/audio_codecs/isac/audio_decoder_isac_fix.h"
#include "webrtc/api/audio_codecs/opus/audio_decoder_opus.h"
#include "webrtc/rtc_base/ptr_util.h"
#include "webrtc/test/gmock.h"
@@ -166,6 +167,19 @@ TEST(AudioDecoderFactoryTemplateTest, Ilbc) {
EXPECT_EQ(8000, dec->SampleRateHz());
}
+TEST(AudioDecoderFactoryTemplateTest, IsacFix) {
+ auto factory = CreateAudioDecoderFactory<AudioDecoderIsacFix>();
+ EXPECT_THAT(factory->GetSupportedDecoders(),
+ testing::ElementsAre(AudioCodecSpec{
+ {"ISAC", 16000, 1}, {16000, 1, 32000, 10000, 32000}}));
+ EXPECT_FALSE(factory->IsSupportedDecoder({"isac", 16000, 2}));
+ EXPECT_TRUE(factory->IsSupportedDecoder({"isac", 16000, 1}));
+ EXPECT_EQ(nullptr, factory->MakeAudioDecoder({"isac", 8000, 1}));
+ auto dec = factory->MakeAudioDecoder({"isac", 16000, 1});
+ ASSERT_NE(nullptr, dec);
+ EXPECT_EQ(16000, dec->SampleRateHz());
+}
+
TEST(AudioDecoderFactoryTemplateTest, L16) {
auto factory = CreateAudioDecoderFactory<AudioDecoderL16>();
EXPECT_THAT(

Powered by Google App Engine
This is Rietveld 408576698