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
2b0f68a0
authored
Jul 15, 2015
by
Oliver Woodman
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Rm Timescale from AudioTrack. Not required.
parent
72d42fbc
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
15 deletions
library/src/main/java/com/google/android/exoplayer/MediaCodecAudioTrackRenderer.java
library/src/main/java/com/google/android/exoplayer/audio/AudioTrack.java
library/src/main/java/com/google/android/exoplayer/MediaCodecAudioTrackRenderer.java
View file @
2b0f68a0
...
...
@@ -68,7 +68,7 @@ public class MediaCodecAudioTrackRenderer extends MediaCodecTrackRenderer implem
private
static
final
String
RAW_DECODER_NAME
=
"OMX.google.raw.decoder"
;
private
final
EventListener
eventListener
;
pr
otected
final
AudioTrack
audioTrack
;
pr
ivate
final
AudioTrack
audioTrack
;
private
int
audioSessionId
;
private
long
currentPositionUs
;
...
...
library/src/main/java/com/google/android/exoplayer/audio/AudioTrack.java
View file @
2b0f68a0
...
...
@@ -145,8 +145,6 @@ public final class AudioTrack {
private
static
final
int
MIN_PLAYHEAD_OFFSET_SAMPLE_INTERVAL_US
=
30000
;
private
static
final
int
MIN_TIMESTAMP_SAMPLE_INTERVAL_US
=
500000
;
private
static
final
int
DEFAULT_TIMESCALE_PERCENT
=
100
;
/**
* Whether to enable a workaround for an issue where an audio effect does not keep its session
* active across releasing/initializing a new audio track, on platform API version < 21.
...
...
@@ -193,7 +191,6 @@ public final class AudioTrack {
private
long
resumeSystemTimeUs
;
private
long
latencyUs
;
private
float
volume
;
private
int
timeScalePercent
;
private
byte
[]
temporaryBuffer
;
private
int
temporaryBufferOffset
;
...
...
@@ -221,7 +218,6 @@ public final class AudioTrack {
}
playheadOffsets
=
new
long
[
MAX_PLAYHEAD_OFFSET_COUNT
];
volume
=
1.0f
;
timeScalePercent
=
DEFAULT_TIMESCALE_PERCENT
;
startMediaTimeState
=
START_NOT_SET
;
}
...
...
@@ -481,7 +477,7 @@ public final class AudioTrack {
}
else
{
// Sanity check that bufferStartTime is consistent with the expected value.
long
expectedBufferStartTime
=
startMediaTimeUs
+
(
framesToDurationUs
(
bytesToFrames
(
submittedBytes
))
*
timeScalePercent
)
/
100
;
+
framesToDurationUs
(
bytesToFrames
(
submittedBytes
))
;
if
(
startMediaTimeState
==
START_IN_SYNC
&&
Math
.
abs
(
expectedBufferStartTime
-
bufferStartTime
)
>
200000
)
{
Log
.
e
(
TAG
,
"Discontinuity detected [expected "
+
expectedBufferStartTime
+
", got "
...
...
@@ -591,15 +587,6 @@ public final class AudioTrack {
}
/**
* Updates the timescale percent for reporting current time
*
* @param timeScalePercent The new percent multiplier
*/
public
void
setTimeScalePercent
(
int
timeScalePercent
)
{
this
.
timeScalePercent
=
timeScalePercent
;
}
/**
* Releases the underlying audio track asynchronously. Calling {@link #initialize} will block
* until the audio track has been released, so it is safe to initialize immediately after
* resetting. The audio session may remain active until the instance is {@link #release}d.
...
...
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