From 680b795435a5a501a56610258dce5eda40a1725d Mon Sep 17 00:00:00 2001 From: Andy Hung Date: Wed, 12 Nov 2014 13:18:52 -0800 Subject: Fix AudioTrack loop mode to play audio from buffer start Bug: 18217633 Change-Id: Ica77acf0a32832d9b04eb657ef2f4f5329f8fbda --- media/libmedia/AudioTrack.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'media/libmedia/AudioTrack.cpp') diff --git a/media/libmedia/AudioTrack.cpp b/media/libmedia/AudioTrack.cpp index c11050e..bbab2c1 100644 --- a/media/libmedia/AudioTrack.cpp +++ b/media/libmedia/AudioTrack.cpp @@ -742,8 +742,7 @@ status_t AudioTrack::setLoop(uint32_t loopStart, uint32_t loopEnd, int loopCount void AudioTrack::setLoop_l(uint32_t loopStart, uint32_t loopEnd, int loopCount) { - // FIXME If setting a loop also sets position to start of loop, then - // this is correct. Otherwise it should be removed. + // Setting the loop will reset next notification update period (like setPosition). mNewPosition = updateAndGetPosition_l() + mUpdatePeriod; mLoopPeriod = loopCount != 0 ? loopEnd - loopStart : 0; mStaticProxy->setLoop(loopStart, loopEnd, loopCount); -- cgit v1.1