summaryrefslogtreecommitdiffstats
path: root/media/libmedia
diff options
context:
space:
mode:
authorGlenn Kasten <gkasten@google.com>2013-08-09 14:32:40 -0700
committerGlenn Kasten <gkasten@android.com>2013-08-09 16:01:03 -0700
commita0d77cd6bf5f4ee3ee9d67ad26e7f9981991d4e7 (patch)
tree0fcfaa98191e91c3f464a93937ef51daf331d9a9 /media/libmedia
parentd0f5664abb5a8d94ae13f63a5f3491b47383ee2f (diff)
downloadframeworks_av-a0d77cd6bf5f4ee3ee9d67ad26e7f9981991d4e7.zip
frameworks_av-a0d77cd6bf5f4ee3ee9d67ad26e7f9981991d4e7.tar.gz
frameworks_av-a0d77cd6bf5f4ee3ee9d67ad26e7f9981991d4e7.tar.bz2
Fix SoundPool.play() looping regression in 4.3 DO NOT MERGE
The change I7370d6e59a7ef26dfb284a8b058d5ab2e0a42ccf caused a regression in SoundPool looping when using SoundPool's streaming implementation. This reverts a portion of that change. Bug: https://code.google.com/p/android/issues/detail?id=58113 Bug: 10171337 Change-Id: I8af0dc8683a7c7f225c80f0eb4d39770667b52e5
Diffstat (limited to 'media/libmedia')
-rw-r--r--media/libmedia/AudioTrack.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/media/libmedia/AudioTrack.cpp b/media/libmedia/AudioTrack.cpp
index 7eeb4f8..2c84605 100644
--- a/media/libmedia/AudioTrack.cpp
+++ b/media/libmedia/AudioTrack.cpp
@@ -557,7 +557,9 @@ status_t AudioTrack::setLoop(uint32_t loopStart, uint32_t loopEnd, int loopCount
// must be called with mLock held
status_t AudioTrack::setLoop_l(uint32_t loopStart, uint32_t loopEnd, int loopCount)
{
- if (mSharedBuffer == 0 || mIsTimed) {
+ // SoundPool streaming implementation uses AudioTrack EVENT_MORE_DATA callback mode,
+ // and relies on being able to loop the data provided by the most recent callback.
+ if (/*mSharedBuffer == 0 ||*/ mIsTimed) {
return INVALID_OPERATION;
}