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
ce3d5c9a
authored
May 01, 2015
by
Oliver Woodman
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Throw when getMinBufferSize returns an error value.
parent
e6c7defc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
0 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 @
ce3d5c9a
...
@@ -16,6 +16,7 @@
...
@@ -16,6 +16,7 @@
package
com
.
google
.
android
.
exoplayer
.
audio
;
package
com
.
google
.
android
.
exoplayer
.
audio
;
import
com.google.android.exoplayer.C
;
import
com.google.android.exoplayer.C
;
import
com.google.android.exoplayer.util.Assertions
;
import
com.google.android.exoplayer.util.Util
;
import
com.google.android.exoplayer.util.Util
;
import
android.annotation.SuppressLint
;
import
android.annotation.SuppressLint
;
...
@@ -371,6 +372,7 @@ public final class AudioTrack {
...
@@ -371,6 +372,7 @@ public final class AudioTrack {
ac3Bitrate
=
UNKNOWN_AC3_BITRATE
;
// Calculated on receiving the first buffer if isAc3 is true.
ac3Bitrate
=
UNKNOWN_AC3_BITRATE
;
// Calculated on receiving the first buffer if isAc3 is true.
frameSize
=
2
*
channelCount
;
// 2 bytes per 16 bit sample * number of channels.
frameSize
=
2
*
channelCount
;
// 2 bytes per 16 bit sample * number of channels.
minBufferSize
=
android
.
media
.
AudioTrack
.
getMinBufferSize
(
sampleRate
,
channelConfig
,
encoding
);
minBufferSize
=
android
.
media
.
AudioTrack
.
getMinBufferSize
(
sampleRate
,
channelConfig
,
encoding
);
Assertions
.
checkState
(
minBufferSize
!=
android
.
media
.
AudioTrack
.
ERROR_BAD_VALUE
);
if
(
specifiedBufferSize
!=
0
)
{
if
(
specifiedBufferSize
!=
0
)
{
bufferSize
=
specifiedBufferSize
;
bufferSize
=
specifiedBufferSize
;
...
...
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