Revert "Remove WEBRTC_TRACE."
This reverts commit 2209b90449473e1df3e0797b6271c7624b41907d. Reason for revert: breaks Chromium Original change's description: > Remove WEBRTC_TRACE. > > Bug: webrtc:5118 > Change-Id: I0af0f8845ee016fa61d7cecc526e2a672ec8732d > Reviewed-on: https://webrtc-review.googlesource.com/5382 > Reviewed-by: Niels Moller <nisse@webrtc.org> > Reviewed-by: Sami Kalliomäki <sakal@webrtc.org> > Reviewed-by: Karl Wiberg <kwiberg@webrtc.org> > Commit-Queue: Fredrik Solenberg <solenberg@webrtc.org> > Cr-Commit-Position: refs/heads/master@{#20114} TBR=solenberg@webrtc.org,sakal@webrtc.org,kwiberg@webrtc.org,nisse@webrtc.org Change-Id: Ie54fc05c1d7895c088cba410ed87a7c9a0701427 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: webrtc:5118 Reviewed-on: https://webrtc-review.googlesource.com/5980 Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org> Commit-Queue: Fredrik Solenberg <solenberg@webrtc.org> Cr-Commit-Position: refs/heads/master@{#20115}
This commit is contained in:
committed by
Commit Bot
parent
2209b90449
commit
729b9109ca
@ -15,6 +15,7 @@
|
||||
|
||||
#include "modules/audio_processing/test/test_utils.h"
|
||||
#include "rtc_base/checks.h"
|
||||
#include "test/testsupport/trace_to_stderr.h"
|
||||
|
||||
namespace webrtc {
|
||||
namespace test {
|
||||
@ -87,6 +88,11 @@ void WavBasedSimulator::PrepareReverseProcessStreamCall() {
|
||||
}
|
||||
|
||||
void WavBasedSimulator::Process() {
|
||||
std::unique_ptr<test::TraceToStderr> trace_to_stderr;
|
||||
if (settings_.use_verbose_logging) {
|
||||
trace_to_stderr.reset(new test::TraceToStderr(true));
|
||||
}
|
||||
|
||||
if (settings_.custom_call_order_filename) {
|
||||
call_chain_ = WavBasedSimulator::GetCustomEventChain(
|
||||
*settings_.custom_call_order_filename);
|
||||
@ -100,6 +106,8 @@ void WavBasedSimulator::Process() {
|
||||
bool samples_left_to_process = true;
|
||||
int call_chain_index = 0;
|
||||
int num_forward_chunks_processed = 0;
|
||||
const int kOneBykChunksPerSecond =
|
||||
1.f / AudioProcessingSimulator::kChunksPerSecond;
|
||||
while (samples_left_to_process) {
|
||||
switch (call_chain_[call_chain_index]) {
|
||||
case SimulationEventType::kProcessStream:
|
||||
@ -116,6 +124,11 @@ void WavBasedSimulator::Process() {
|
||||
}
|
||||
|
||||
call_chain_index = (call_chain_index + 1) % call_chain_.size();
|
||||
|
||||
if (trace_to_stderr) {
|
||||
trace_to_stderr->SetTimeSeconds(num_forward_chunks_processed *
|
||||
kOneBykChunksPerSecond);
|
||||
}
|
||||
}
|
||||
|
||||
DestroyAudioProcessor();
|
||||
|
||||
Reference in New Issue
Block a user