| commit | a0d77cd6bf5f4ee3ee9d67ad26e7f9981991d4e7 | [log] [tgz] |
|---|---|---|
| author | Glenn Kasten <gkasten@google.com> | Fri Aug 09 14:32:40 2013 -0700 |
| committer | Glenn Kasten <gkasten@android.com> | Fri Aug 09 16:01:03 2013 -0700 |
| tree | 0fcfaa98191e91c3f464a93937ef51daf331d9a9 | |
| parent | d0f5664abb5a8d94ae13f63a5f3491b47383ee2f [diff] |
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
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 @@ // 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; }