Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
SDK
/
exoplayer
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
def01f68
authored
Jun 18, 2019
by
olly
Committed by
Oliver Woodman
Jun 19, 2019
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Let AudioTrack write headers on SDK_INT >= 26
Issue: #6031 PiperOrigin-RevId: 253784986
parent
d072a526
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
5 deletions
library/core/src/main/java/com/google/android/exoplayer2/audio/DefaultAudioSink.java
library/core/src/main/java/com/google/android/exoplayer2/audio/DefaultAudioSink.java
View file @
def01f68
...
@@ -1178,11 +1178,10 @@ public final class DefaultAudioSink implements AudioSink {
...
@@ -1178,11 +1178,10 @@ public final class DefaultAudioSink implements AudioSink {
@TargetApi
(
21
)
@TargetApi
(
21
)
private
int
writeNonBlockingWithAvSyncV21
(
AudioTrack
audioTrack
,
ByteBuffer
buffer
,
int
size
,
private
int
writeNonBlockingWithAvSyncV21
(
AudioTrack
audioTrack
,
ByteBuffer
buffer
,
int
size
,
long
presentationTimeUs
)
{
long
presentationTimeUs
)
{
// TODO: Uncomment this when [Internal ref: b/33627517] is clarified or fixed.
if
(
Util
.
SDK_INT
>=
26
)
{
// if (Util.SDK_INT >= 23) {
// The underlying platform AudioTrack writes AV sync headers directly.
// // The underlying platform AudioTrack writes AV sync headers directly.
return
audioTrack
.
write
(
buffer
,
size
,
WRITE_NON_BLOCKING
,
presentationTimeUs
*
1000
);
// return audioTrack.write(buffer, size, WRITE_NON_BLOCKING, presentationTimeUs * 1000);
}
// }
if
(
avSyncHeader
==
null
)
{
if
(
avSyncHeader
==
null
)
{
avSyncHeader
=
ByteBuffer
.
allocate
(
16
);
avSyncHeader
=
ByteBuffer
.
allocate
(
16
);
avSyncHeader
.
order
(
ByteOrder
.
BIG_ENDIAN
);
avSyncHeader
.
order
(
ByteOrder
.
BIG_ENDIAN
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment