mirror of
https://github.com/samsonjs/media.git
synced 2026-03-30 10:15:48 +00:00
Let AudioTrack write headers on SDK_INT >= 26
Issue: #6031 PiperOrigin-RevId: 253784986
This commit is contained in:
parent
d072a5261e
commit
def01f68b9
1 changed files with 4 additions and 5 deletions
|
|
@ -1178,11 +1178,10 @@ public final class DefaultAudioSink implements AudioSink {
|
|||
@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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue