Add capture timestamps to test audio device.
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 <henrika@webrtc.org>
Commit-Queue: Olov Brändström <brandstrom@google.com>
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39265}
diff --git a/modules/audio_device/include/test_audio_device.cc b/modules/audio_device/include/test_audio_device.cc
index 2189646..eacded7 100644
--- a/modules/audio_device/include/test_audio_device.cc
+++ b/modules/audio_device/include/test_audio_device.cc
@@ -159,7 +159,10 @@
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;