Added an audioproc option to not report the stream delay
Bug: webrtc:9316 Change-Id: If7a20bbac998e9a779579650f3eb9019f974e9a8 Reviewed-on: https://webrtc-review.googlesource.com/79141 Reviewed-by: Jesus de Vicente Pena <devicentepena@webrtc.org> Commit-Queue: Per Åhgren <peah@webrtc.org> Cr-Commit-Position: refs/heads/master@{#23415}
This commit is contained in:
@ -133,6 +133,7 @@ void AecDumpBasedSimulator::PrepareProcessStreamCall(
|
||||
}
|
||||
}
|
||||
|
||||
if (!settings_.use_stream_delay || *settings_.use_stream_delay) {
|
||||
if (!settings_.stream_delay) {
|
||||
if (msg.has_delay()) {
|
||||
RTC_CHECK_EQ(AudioProcessing::kNoError,
|
||||
@ -142,6 +143,7 @@ void AecDumpBasedSimulator::PrepareProcessStreamCall(
|
||||
RTC_CHECK_EQ(AudioProcessing::kNoError,
|
||||
ap_->set_stream_delay_ms(*settings_.stream_delay));
|
||||
}
|
||||
}
|
||||
|
||||
if (!settings_.stream_drift_samples) {
|
||||
if (msg.has_drift()) {
|
||||
|
@ -35,6 +35,7 @@ struct SimulationSettings {
|
||||
SimulationSettings(const SimulationSettings&);
|
||||
~SimulationSettings();
|
||||
rtc::Optional<int> stream_delay;
|
||||
rtc::Optional<bool> use_stream_delay;
|
||||
rtc::Optional<int> stream_drift_samples;
|
||||
rtc::Optional<int> output_sample_rate_hz;
|
||||
rtc::Optional<int> output_num_channels;
|
||||
|
@ -165,6 +165,9 @@ DEFINE_int(ns_level,
|
||||
DEFINE_int(stream_delay,
|
||||
kParameterNotSpecifiedValue,
|
||||
"Specify the stream delay in ms to use");
|
||||
DEFINE_int(use_stream_delay,
|
||||
kParameterNotSpecifiedValue,
|
||||
"Activate (1) or deactivate(0) reporting the stream delay");
|
||||
DEFINE_int(stream_drift_samples,
|
||||
kParameterNotSpecifiedValue,
|
||||
"Specify the number of stream drift samples to use");
|
||||
@ -286,6 +289,7 @@ SimulationSettings CreateSettings() {
|
||||
SetSettingIfSpecified(FLAG_vad_likelihood, &settings.vad_likelihood);
|
||||
SetSettingIfSpecified(FLAG_ns_level, &settings.ns_level);
|
||||
SetSettingIfSpecified(FLAG_stream_delay, &settings.stream_delay);
|
||||
SetSettingIfFlagSet(FLAG_use_stream_delay, &settings.use_stream_delay);
|
||||
SetSettingIfSpecified(FLAG_stream_drift_samples,
|
||||
&settings.stream_drift_samples);
|
||||
SetSettingIfSpecified(FLAG_custom_call_order_file,
|
||||
|
@ -74,9 +74,11 @@ void WavBasedSimulator::PrepareProcessStreamCall() {
|
||||
}
|
||||
ap_->set_stream_key_pressed(settings_.use_ts && (*settings_.use_ts));
|
||||
|
||||
if (!settings_.use_stream_delay || *settings_.use_stream_delay) {
|
||||
RTC_CHECK_EQ(AudioProcessing::kNoError,
|
||||
ap_->set_stream_delay_ms(
|
||||
settings_.stream_delay ? *settings_.stream_delay : 0));
|
||||
}
|
||||
|
||||
ap_->echo_cancellation()->set_stream_drift_samples(
|
||||
settings_.stream_drift_samples ? *settings_.stream_drift_samples : 0);
|
||||
|
Reference in New Issue
Block a user