From 6b74d671a1321a6ecc4a40b6c87beedfecc1ec44 Mon Sep 17 00:00:00 2001 From: Marco Nelissen Date: Tue, 28 Feb 2012 16:07:44 -0800 Subject: 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 --- media/libmedia/mediaplayer.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'media/libmedia/mediaplayer.cpp') diff --git a/media/libmedia/mediaplayer.cpp b/media/libmedia/mediaplayer.cpp index 4ff1862..eedb3ce 100644 --- a/media/libmedia/mediaplayer.cpp +++ b/media/libmedia/mediaplayer.cpp @@ -788,4 +788,11 @@ void MediaPlayer::died() } +status_t MediaPlayer::setNextMediaPlayer(const sp& next) { + if (mPlayer == NULL) { + return NO_INIT; + } + return mPlayer->setNextPlayer(next == NULL ? NULL : next->mPlayer); +} + }; // namespace android -- cgit v1.1