Commit 4fa383c0 by andrewlewis Committed by Oliver Woodman

Work around stalled AudioTrack up to API 28

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=188173078
parent b37773c5
...@@ -1443,7 +1443,7 @@ public final class DefaultAudioSink implements AudioSink { ...@@ -1443,7 +1443,7 @@ public final class DefaultAudioSink implements AudioSink {
rawPlaybackHeadPosition += passthroughWorkaroundPauseOffset; rawPlaybackHeadPosition += passthroughWorkaroundPauseOffset;
} }
if (Util.SDK_INT <= 26) { if (Util.SDK_INT <= 28) {
if (rawPlaybackHeadPosition == 0 && lastRawPlaybackHeadPosition > 0 if (rawPlaybackHeadPosition == 0 && lastRawPlaybackHeadPosition > 0
&& state == PLAYSTATE_PLAYING) { && state == PLAYSTATE_PLAYING) {
// If connecting a Bluetooth audio device fails, the AudioTrack may be left in a state // If connecting a Bluetooth audio device fails, the AudioTrack may be left in a state
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment