summaryrefslogtreecommitdiffstats
path: root/media/libstagefright
diff options
context:
space:
mode:
authorMarco Nelissen <marcone@google.com>2012-02-28 16:07:44 -0800
committerMarco Nelissen <marcone@google.com>2012-03-13 13:13:14 -0700
commit84b832054552e00257bb04997143ca33d6d100be (patch)
treecf04f15f15da2d9ddbd2112b2b89542f6270b4ce /media/libstagefright
parentf19d5f0271a9e0cdf3a79c6ccab5aa151b0b3239 (diff)
downloadframeworks_base-84b832054552e00257bb04997143ca33d6d100be.zip
frameworks_base-84b832054552e00257bb04997143ca33d6d100be.tar.gz
frameworks_base-84b832054552e00257bb04997143ca33d6d100be.tar.bz2
Gapless playback, step 1.
Currently able to play Ogg Vorbis, PCM WAV and other lossless files seamlessly by reusing the initial AudioTrack for subsequent players. Change-Id: Ie7cf6b9076bdf4f9211574456d192c02c04fecc7
Diffstat (limited to 'media/libstagefright')
-rw-r--r--media/libstagefright/AudioPlayer.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/media/libstagefright/AudioPlayer.cpp b/media/libstagefright/AudioPlayer.cpp
index 2b3cb1a..f84e37f 100644
--- a/media/libstagefright/AudioPlayer.cpp
+++ b/media/libstagefright/AudioPlayer.cpp
@@ -419,7 +419,11 @@ size_t AudioPlayer::fillBuffer(void *data, size_t size) {
timeToCompletionUs, timeToCompletionUs / 1E6);
postEOS = true;
- postEOSDelayUs = timeToCompletionUs + mLatencyUs;
+ if (mAudioSink->needsTrailingPadding()) {
+ postEOSDelayUs = timeToCompletionUs + mLatencyUs;
+ } else {
+ postEOSDelayUs = 0;
+ }
}
mReachedEOS = true;