Removes flaky thread checker in AudioDeviceBuffer.

This CL removes a set of DCHECKs in AudioDeviceBuffer (ADB) where the goal has been
to ensure that some methods are called on one and the same native I/O thread.
The implementation of the ADB is platform independent but the underlying (driving)
audio components differ between platforms. This combination has shown to generate complex
corner cases such as:

- OS dependent I/O-thread(s) changes while audio is active
- OS dependent audio device changes and it leads to restart of native I/O threads
- Start/Stop of audio has different timing depending on platform and possibly also usage of
JNI and/or emulators.

To summarize: the gain of maintaining the current strict thread checking (in Debug mode)
is not worth all the efforts trying to resolve complex dynamic cases where the native
I/O threads changes ID.

TBR=glaznev

Bug: b/115385789
Change-Id: I681c89adec497a18b97d2a40421c04ea218fd919
Reviewed-on: https://webrtc-review.googlesource.com/100200
Commit-Queue: Henrik Andreassson <henrika@webrtc.org>
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24723}
This commit is contained in:
henrika
2018-09-13 13:01:14 +02:00
committed by Commit Bot
parent ef615ea7a3
commit 36b3179312
9 changed files with 8 additions and 61 deletions

View File

@ -915,12 +915,6 @@ void AudioDeviceIOS::PrepareForNewStart() {
// which means that we must detach thread checkers here to be prepared for an
// upcoming new audio stream.
io_thread_checker_.DetachFromThread();
// The audio device buffer must also be informed about the interrupted
// state so it can detach its thread checkers as well.
if (audio_device_buffer_) {
audio_device_buffer_->NativeAudioPlayoutInterrupted();
audio_device_buffer_->NativeAudioRecordingInterrupted();
}
}
bool AudioDeviceIOS::IsInterrupted() {