From 1f33a2ba3ff821a9d2c8c3a4d087ec3cddec19ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Olov=20Br=C3=A4ndstr=C3=B6m?= Date: Tue, 7 Feb 2023 10:49:50 +0100 Subject: [PATCH] Add capture timestamps to test audio device. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Absolute capture time extension did not work in tests that use test_audio_device. This change add capture timestamp to test audio device so absolute capture timestamp extensions can be sent in tests. This make it possible to write tests for absolute header extension in Hamrit, and possible other test platforms as well. Bug: None Change-Id: Ie237f516ce0cccf43c32fe40da76a9d31f9fba53 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/292340 Reviewed-by: Henrik Andreassson Commit-Queue: Olov Brändström Reviewed-by: Artem Titov Cr-Commit-Position: refs/heads/main@{#39265} --- modules/audio_device/include/test_audio_device.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/audio_device/include/test_audio_device.cc b/modules/audio_device/include/test_audio_device.cc index 2189646eff..eacded7728 100644 --- a/modules/audio_device/include/test_audio_device.cc +++ b/modules/audio_device/include/test_audio_device.cc @@ -159,7 +159,10 @@ class TestAudioDeviceModuleImpl recording_buffer_.data(), recording_buffer_.size() / capturer_->NumChannels(), 2 * capturer_->NumChannels(), capturer_->NumChannels(), - capturer_->SamplingFrequency(), 0, 0, 0, false, new_mic_level); + capturer_->SamplingFrequency(), /*totalDelayMS=*/0, + /*clockDrift=*/0, + /*currentMicLevel=*/0, /*keyPressed=*/false, new_mic_level, + absl::make_optional(rtc::TimeNanos())); } if (!keep_capturing) { capturing_ = false;