Allow StartRecording if capturer is null in test ADM
Bug: b/272350185 Change-Id: I3aca6d8b3eb4fd39a6d39f1fea272858e18193bc Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/311463 Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org> Auto-Submit: Artem Titov <titovartem@webrtc.org> Commit-Queue: Artem Titov <titovartem@webrtc.org> Cr-Commit-Position: refs/heads/main@{#40407}
This commit is contained in:
parent
2feee9da60
commit
599367595d
@ -139,7 +139,6 @@ bool TestAudioDevice::RecordingIsInitialized() const {
|
||||
|
||||
int32_t TestAudioDevice::StartRecording() {
|
||||
MutexLock lock(&lock_);
|
||||
RTC_CHECK(capturer_);
|
||||
capturing_ = true;
|
||||
return 0;
|
||||
}
|
||||
@ -165,7 +164,7 @@ void TestAudioDevice::ProcessAudio() {
|
||||
if (audio_buffer_ == nullptr) {
|
||||
return;
|
||||
}
|
||||
if (capturing_) {
|
||||
if (capturing_ && capturer_ != nullptr) {
|
||||
// Capture 10ms of audio. 2 bytes per sample.
|
||||
const bool keep_capturing = capturer_->Capture(&recording_buffer_);
|
||||
if (recording_buffer_.size() > 0) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user