Make capture timestamp optional in ADM.
This is to avoid using 0 as a default value.
Also fix a bug in audio_device_buffer where the timestamp aligner used the wrong input timestamp.
Bug: webrtc:13609
Change-Id: I00016e68ab50d052990c2b9f80aa1e2d7e167b93
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/291118
Reviewed-by: Olov Brändström <brandstrom@google.com>
Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39177}
diff --git a/audio/audio_transport_impl.h b/audio/audio_transport_impl.h
index ba067de..24b09d2 100644
--- a/audio/audio_transport_impl.h
+++ b/audio/audio_transport_impl.h
@@ -52,17 +52,18 @@
bool keyPressed,
uint32_t& newMicLevel) override;
- int32_t RecordedDataIsAvailable(const void* audioSamples,
- size_t nSamples,
- size_t nBytesPerSample,
- size_t nChannels,
- uint32_t samplesPerSec,
- uint32_t totalDelayMS,
- int32_t clockDrift,
- uint32_t currentMicLevel,
- bool keyPressed,
- uint32_t& newMicLevel,
- int64_t estimated_capture_time_ns) override;
+ int32_t RecordedDataIsAvailable(
+ const void* audioSamples,
+ size_t nSamples,
+ size_t nBytesPerSample,
+ size_t nChannels,
+ uint32_t samplesPerSec,
+ uint32_t totalDelayMS,
+ int32_t clockDrift,
+ uint32_t currentMicLevel,
+ bool keyPressed,
+ uint32_t& newMicLevel,
+ absl::optional<int64_t> estimated_capture_time_ns) override;
int32_t NeedMorePlayData(size_t nSamples,
size_t nBytesPerSample,