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
3f1638de
authored
Apr 17, 2015
by
Oliver Woodman
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Use ENCODING_PCM_16BIT for keepSessionIdAudioTrack.
ENCODING_PCM_8BIT support is not required.
parent
e4e6a1ca
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 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 @
3f1638de
...
@@ -292,8 +292,8 @@ public final class AudioTrack {
...
@@ -292,8 +292,8 @@ public final class AudioTrack {
if
(
keepSessionIdAudioTrack
==
null
)
{
if
(
keepSessionIdAudioTrack
==
null
)
{
int
sampleRate
=
4000
;
// Equal to private android.media.AudioTrack.MIN_SAMPLE_RATE.
int
sampleRate
=
4000
;
// Equal to private android.media.AudioTrack.MIN_SAMPLE_RATE.
int
channelConfig
=
AudioFormat
.
CHANNEL_OUT_MONO
;
int
channelConfig
=
AudioFormat
.
CHANNEL_OUT_MONO
;
int
encoding
=
AudioFormat
.
ENCODING_PCM_
8
BIT
;
int
encoding
=
AudioFormat
.
ENCODING_PCM_
16
BIT
;
int
bufferSize
=
1
;
// Use a one
byte buffer, as it is not actually used for playback.
int
bufferSize
=
2
;
// Use a two
byte buffer, as it is not actually used for playback.
keepSessionIdAudioTrack
=
new
android
.
media
.
AudioTrack
(
AudioManager
.
STREAM_MUSIC
,
keepSessionIdAudioTrack
=
new
android
.
media
.
AudioTrack
(
AudioManager
.
STREAM_MUSIC
,
sampleRate
,
channelConfig
,
encoding
,
bufferSize
,
android
.
media
.
AudioTrack
.
MODE_STATIC
,
sampleRate
,
channelConfig
,
encoding
,
bufferSize
,
android
.
media
.
AudioTrack
.
MODE_STATIC
,
sessionId
);
sessionId
);
...
...
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