Commit d1360ad7 by Oliver Woodman

Pragmatic fix for "stuck-in-ready-state" when seeking near the

end of some streams.
parent 066334da
...@@ -479,7 +479,9 @@ public final class AudioTrack { ...@@ -479,7 +479,9 @@ public final class AudioTrack {
/** Returns whether enough data has been supplied via {@link #handleBuffer} to begin playback. */ /** Returns whether enough data has been supplied via {@link #handleBuffer} to begin playback. */
public boolean hasEnoughDataToBeginPlayback() { public boolean hasEnoughDataToBeginPlayback() {
return submittedBytes >= minBufferSize; // The value of minBufferSize can be slightly less than what's actually required for playback
// to start, hence the multiplication factor.
return submittedBytes > (minBufferSize * 3) / 2;
} }
/** Sets the playback volume. */ /** Sets the playback volume. */
......
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