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

Unified Diff: webrtc/modules/audio_coding/neteq/tools/neteq_performance_test.cc

Issue 1750353002: Change NetEq::GetAudio to use AudioFrame (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Rebase Created 4 years, 10 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/tools/neteq_performance_test.cc
diff --git a/webrtc/modules/audio_coding/neteq/tools/neteq_performance_test.cc b/webrtc/modules/audio_coding/neteq/tools/neteq_performance_test.cc
index 7d1f9f9798c6e19b772964b873d35e091a2e15ed..f1577df26ffcd40faba5a8a27fc21285e733cc02 100644
--- a/webrtc/modules/audio_coding/neteq/tools/neteq_performance_test.cc
+++ b/webrtc/modules/audio_coding/neteq/tools/neteq_performance_test.cc
@@ -14,6 +14,7 @@
#include "webrtc/modules/audio_coding/neteq/include/neteq.h"
#include "webrtc/modules/audio_coding/neteq/tools/audio_loop.h"
#include "webrtc/modules/audio_coding/neteq/tools/rtp_generator.h"
+#include "webrtc/modules/include/module_common_types.h"
#include "webrtc/system_wrappers/include/clock.h"
#include "webrtc/test/testsupport/fileutils.h"
#include "webrtc/typedefs.h"
@@ -103,21 +104,15 @@ int64_t NetEqPerformanceTest::Run(int runtime_ms,
}
// Get output audio, but don't do anything with it.
- static const int kMaxChannels = 1;
- static const size_t kMaxSamplesPerMs = 48000 / 1000;
- static const int kOutputBlockSizeMs = 10;
- static const size_t kOutDataLen =
- kOutputBlockSizeMs * kMaxSamplesPerMs * kMaxChannels;
- int16_t out_data[kOutDataLen];
- size_t num_channels;
- size_t samples_per_channel;
- int error = neteq->GetAudio(kOutDataLen, out_data, &samples_per_channel,
- &num_channels, NULL);
+ AudioFrame out_frame;
+ int error = neteq->GetAudio(&out_frame, NULL);
if (error != NetEq::kOK)
return -1;
- assert(samples_per_channel == static_cast<size_t>(kSampRateHz * 10 / 1000));
+ assert(out_frame.samples_per_channel_ ==
+ static_cast<size_t>(kSampRateHz * 10 / 1000));
+ static const int kOutputBlockSizeMs = 10;
time_now_ms += kOutputBlockSizeMs;
if (time_now_ms >= runtime_ms / 2 && !drift_flipped) {
// Apply negative drift second half of simulation.

Powered by Google App Engine
This is Rietveld 408576698