Add an option to avoid early initialization of audio capture
This can cause issues on Android S if this initialization happens when
the app doesn't have permission to access the microphone.
Bug: b/197461765
Change-Id: Iebccff9d15f5bb12a7b2c78e1c373e379b37a127
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/246104
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Commit-Queue: Xavier Lepaul‎ <xalep@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35689}
diff --git a/api/audio_options.h b/api/audio_options.h
index 7d933ae..48dd628 100644
--- a/api/audio_options.h
+++ b/api/audio_options.h
@@ -83,6 +83,10 @@
absl::optional<bool> audio_network_adaptor;
// Config string for audio network adaptor.
absl::optional<std::string> audio_network_adaptor_config;
+ // Pre-initialize the ADM for recording when starting to send. Default to
+ // true.
+ // TODO(webrtc:13566): Remove this option. See issue for details.
+ absl::optional<bool> init_recording_on_send;
};
} // namespace cricket