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

Unified Diff: webrtc/audio/test/low_bandwidth_audio_test.cc

Issue 2804083003: Add POLQA to low bandwidth audio test (Closed)
Patch Set: Add POLQA to low bandwidth audio test Created 3 years, 8 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/audio/test/low_bandwidth_audio_test.cc
diff --git a/webrtc/audio/test/low_bandwidth_audio_test.cc b/webrtc/audio/test/low_bandwidth_audio_test.cc
index de955f75e19c936b98e61692f832d62254d8ffcc..eae46369578a60a3e578604ba4a6b4a19566cd81 100644
--- a/webrtc/audio/test/low_bandwidth_audio_test.cc
+++ b/webrtc/audio/test/low_bandwidth_audio_test.cc
@@ -10,6 +10,7 @@
#include <algorithm>
+#include "gflags/gflags.h"
#include "webrtc/audio/test/low_bandwidth_audio_test.h"
#include "webrtc/common_audio/wav_file.h"
#include "webrtc/test/gtest.h"
@@ -23,8 +24,7 @@ constexpr int kExtraRecordTimeMs = 500;
// Large bitrate by default.
const webrtc::CodecInst kDefaultCodec{120, "OPUS", 48000, 960, 2, 64000};
-// The best that can be done with PESQ.
-constexpr int kAudioFileBitRate = 16000;
+DEFINE_int32(bitrate, 16000, "Bitrate of the produced audio file.");
kjellander_webrtc 2017/04/07 18:26:12 This should probably be called sampling_frequency
oprypin_webrtc 2017/04/10 12:20:40 Done.
}
namespace webrtc {
@@ -44,14 +44,15 @@ size_t AudioQualityTest::GetNumFlexfecStreams() const {
}
std::string AudioQualityTest::AudioInputFile() {
- return test::ResourcePath("voice_engine/audio_tiny16", "wav");
+ return test::ResourcePath("voice_engine/audio_tiny" +
+ std::to_string(FLAGS_bitrate / 1000), "wav");
}
std::string AudioQualityTest::AudioOutputFile() {
const ::testing::TestInfo* const test_info =
::testing::UnitTest::GetInstance()->current_test_info();
- return webrtc::test::OutputPath() +
- "LowBandwidth_" + test_info->name() + ".wav";
+ return webrtc::test::OutputPath() + "LowBandwidth_" +
+ test_info->name() + "_" + std::to_string(FLAGS_bitrate / 1000) + ".wav";
}
std::unique_ptr<test::FakeAudioDevice::Capturer>
@@ -62,7 +63,7 @@ std::unique_ptr<test::FakeAudioDevice::Capturer>
std::unique_ptr<test::FakeAudioDevice::Renderer>
AudioQualityTest::CreateRenderer() {
return test::FakeAudioDevice::CreateBoundedWavFileWriter(
- AudioOutputFile(), kAudioFileBitRate);
+ AudioOutputFile(), FLAGS_bitrate);
}
void AudioQualityTest::OnFakeAudioDevicesCreated(

Powered by Google App Engine
This is Rietveld 408576698