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
eec4e24e
authored
Dec 23, 2014
by
Martin Bonnin
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
log all audio errors
parent
69c7cb09
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
library/src/main/java/com/google/android/exoplayer/audio/AudioTrack.java
library/src/main/java/com/google/android/exoplayer/audio/AudioTrack.java
View file @
eec4e24e
...
...
@@ -405,8 +405,6 @@ public final class AudioTrack {
bytesToWrite
=
Math
.
min
(
temporaryBufferSize
,
bytesToWrite
);
bytesWritten
=
audioTrack
.
write
(
temporaryBuffer
,
temporaryBufferOffset
,
bytesToWrite
);
if
(
bytesWritten
<
0
)
{
Log
.
w
(
TAG
,
"AudioTrack.write returned error code: "
+
bytesWritten
);
}
else
{
temporaryBufferOffset
+=
bytesWritten
;
}
}
...
...
@@ -414,11 +412,16 @@ public final class AudioTrack {
bytesWritten
=
writeNonBlockingV21
(
audioTrack
,
buffer
,
temporaryBufferSize
);
}
if
(
bytesWritten
<
0
)
{
Log
.
w
(
TAG
,
"AudioTrack.write returned error code: "
+
bytesWritten
);
result
|=
RESULT_BUFFER_CONSUMED
;
}
else
{
temporaryBufferSize
-=
bytesWritten
;
submittedBytes
+=
bytesWritten
;
if
(
temporaryBufferSize
==
0
)
{
result
|=
RESULT_BUFFER_CONSUMED
;
}
}
return
result
;
}
...
...
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