Skip to content

Commit

Permalink
Let AudioTrack write headers on SDK_INT >= 26
Browse files Browse the repository at this point in the history
Issue: #6031
PiperOrigin-RevId: 253784986
  • Loading branch information
ojw28 committed Jun 18, 2019
1 parent 5aeaa6e commit 38000b8
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1178,11 +1178,10 @@ private static int writeNonBlockingV21(AudioTrack audioTrack, ByteBuffer buffer,
@TargetApi(21)
private int writeNonBlockingWithAvSyncV21(AudioTrack audioTrack, ByteBuffer buffer, int size,
long presentationTimeUs) {
// TODO: Uncomment this when [Internal ref: b/33627517] is clarified or fixed.
// if (Util.SDK_INT >= 23) {
// // The underlying platform AudioTrack writes AV sync headers directly.
// return audioTrack.write(buffer, size, WRITE_NON_BLOCKING, presentationTimeUs * 1000);
// }
if (Util.SDK_INT >= 26) {
// The underlying platform AudioTrack writes AV sync headers directly.
return audioTrack.write(buffer, size, WRITE_NON_BLOCKING, presentationTimeUs * 1000);
}
if (avSyncHeader == null) {
avSyncHeader = ByteBuffer.allocate(16);
avSyncHeader.order(ByteOrder.BIG_ENDIAN);
Expand Down

0 comments on commit 38000b8

Please sign in to comment.