Removes experimental sleep in ADM initialization for Android

Bug: b/63010674
Change-Id: I744fa9be1031784431685a90f5c36d4a37e6a989
Reviewed-on: https://webrtc-review.googlesource.com/17441
Reviewed-by: Alex Glaznev <glaznev@webrtc.org>
Commit-Queue: Henrik Andreassson <henrika@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20518}
This commit is contained in:
henrika
2017-10-31 15:50:47 +01:00
committed by Commit Bot
parent de6914508e
commit ae3981a998
2 changed files with 0 additions and 36 deletions

View File

@ -262,14 +262,6 @@ public class WebRtcAudioRecord {
releaseAudioResources();
return false;
}
// Verify the recording state up to two times (with a sleep in between)
// before returning false and reporting an error.
int numberOfStateChecks = 0;
while (audioRecord.getRecordingState() != AudioRecord.RECORDSTATE_RECORDING &&
++numberOfStateChecks < 2) {
threadSleep(200);
}
if (audioRecord.getRecordingState() != AudioRecord.RECORDSTATE_RECORDING) {
reportWebRtcAudioRecordStartError(
AudioRecordStartErrorCode.AUDIO_RECORD_START_STATE_MISMATCH,
@ -391,14 +383,4 @@ public class WebRtcAudioRecord {
errorCallback.onWebRtcAudioRecordError(errorMessage);
}
}
// Causes the currently executing thread to sleep for the specified number
// of milliseconds.
private void threadSleep(long millis) {
try {
Thread.sleep(millis);
} catch (InterruptedException e) {
Logging.e(TAG, "Thread.sleep failed: " + e.getMessage());
}
}
}

View File

@ -309,14 +309,6 @@ public class WebRtcAudioTrack {
releaseAudioResources();
return false;
}
// Verify the playout state up to two times (with a sleep in between)
// before returning false and reporting an error.
int numberOfStateChecks = 0;
while (audioTrack.getPlayState() != AudioTrack.PLAYSTATE_PLAYING &&
++numberOfStateChecks < 2) {
threadSleep(200);
}
if (audioTrack.getPlayState() != AudioTrack.PLAYSTATE_PLAYING) {
reportWebRtcAudioTrackStartError(
AudioTrackStartErrorCode.AUDIO_TRACK_START_STATE_MISMATCH,
@ -525,14 +517,4 @@ public class WebRtcAudioTrack {
errorCallback.onWebRtcAudioTrackError(errorMessage);
}
}
// Causes the currently executing thread to sleep for the specified number
// of milliseconds.
private void threadSleep(long millis) {
try {
Thread.sleep(millis);
} catch (InterruptedException e) {
Logging.e(TAG, "Thread.sleep failed: " + e.getMessage());
}
}
}