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

@ -235,7 +235,6 @@ void AAudioPlayer::HandleStreamDisconnected() {
}
// Perform a restart by first closing the disconnected stream and then start
// a new stream; this time using the new (preferred) audio output device.
audio_device_buffer_->NativeAudioPlayoutInterrupted();
StopPlayout();
InitPlayout();
StartPlayout();

View File

@ -224,7 +224,6 @@ void AAudioRecorder::HandleStreamDisconnected() {
// TODO(henrika): resolve issue where a one restart attempt leads to a long
// sequence of new calls to OnErrorCallback().
// See b/73148976 for details.
audio_device_buffer_->NativeAudioRecordingInterrupted();
StopRecording();
InitRecording();
StartRecording();