History log of /frameworks/base/media/java/android/media/SoundPool.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
62b9aec7a0a4e1cf8cfec7e39ea3103ab510d72e 07-Nov-2011 Glenn Kasten <gkasten@google.com> Don't check return value of new for being == null

new either succeeds or throws an exception

Change-Id: I1615e10c4f6730495c49e56b64714a00141ea8ff
/frameworks/base/media/java/android/media/SoundPool.java
a60e212d0dda7d2a748180ce77405f2463c9cf53 29-Dec-2010 Eric Laurent <elaurent@google.com> Fix issue 3261656.

The problem can occur if a sample is started at the same time as the last AudioTrack callback
for a playing sample is called. At this time, allocateChannel() can be called concurrently with moveToFront()
which can cause an entry in mChannels being used by moveToFront() to be erased temporarily by allocateChannel().

The fix consists in making sure that the SoundPool mutex is held whenever play(), stop() or done() are called.

In addition, other potential weaknesses have been removed by making sure that the channel mutex is held while
starting, stopping and processing the AudioTrack call back.

To that purpose, a mechanism similar to the channel restart method is implemented to avoid stopping channels
from the AudioTrack call back but do it from the restart thread instead.

The sound effects SounPool management in AudioService has also been improved to make sure that the samples have
been loaded when a playback request is received and also to immediately release the SoundPool when the effects are
unloaded without waiting for the GC to occur.
The SoundPool.java class was modified to allow the use of a looper attached to the thread in which the sample
loaded listener is running and not to the thread in which the SoundPool is created.

The maximum number of samples that can be loaded in a SoundPool lifetime as been increased from 255 to 65535.

Change-Id: I368a3bdfda4239f807f857c3e97b70f6b31b0af3
/frameworks/base/media/java/android/media/SoundPool.java
05513119803845c11d845cbc376759cddcfe13bb 17-Feb-2010 Dave Sparks <davidsparks@android.com> Unhide new SoundPool API's. Bug 2415373.
/frameworks/base/media/java/android/media/SoundPool.java
f992cbb9aae593c7787ac9c5f6b475e7bb0a92c5 09-Feb-2010 Dave Sparks <davidsparks@android.com> Add SoundPool API to pause and resume all active streams. Bug 2426531.
/frameworks/base/media/java/android/media/SoundPool.java
f6e43bf29084760b39257b2273e0f04c2815fdc5 08-Dec-2009 Dave Sparks <davidsparks@android.com> Add OnLoadCompleteListener to SoundPool.
/frameworks/base/media/java/android/media/SoundPool.java
d282ac8610f72d964105efefe41120a5340f1ce0 14-May-2009 Marco Nelissen <marcone@google.com> Findbugs fixes.
/frameworks/base/media/java/android/media/SoundPool.java
6cb9900e6f884adb6c9aa0243f2bf88985f671f8 17-Apr-2009 Dave Sparks <> AI 146755: am: CL 146754 Fix some problems in the SoundPool docs and add additional text.
Original author: davidsparks
Merged from: //branches/cupcake/...

Automated import of CL 146755
/frameworks/base/media/java/android/media/SoundPool.java
cef302d0950a02fdc6920475d0c357d3949e85c3 17-Apr-2009 Dave Sparks <> AI 146655: am: CL 146654 Add java docs for SoundPool
Original author: davidsparks
Merged from: //branches/cupcake/...

Automated import of CL 146655
/frameworks/base/media/java/android/media/SoundPool.java
9066cfe9886ac131c34d59ed0e2d287b0e3c0087 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
/frameworks/base/media/java/android/media/SoundPool.java
d83a98f4ce9cfa908f5c54bbd70f03eec07e7553 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
/frameworks/base/media/java/android/media/SoundPool.java
076357b8567458d4b6dfdcf839ef751634cd2bfb 03-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@132589
/frameworks/base/media/java/android/media/SoundPool.java
3dec7d563a2f3e1eb967ce2054a00b6620e3558c 03-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@137055
/frameworks/base/media/java/android/media/SoundPool.java
f013e1afd1e68af5e3b868c26a653bbfb39538f8 18-Dec-2008 The Android Open Source Project <initial-contribution@android.com> Code drop from //branches/cupcake/...@124589
/frameworks/base/media/java/android/media/SoundPool.java
54b6cfa9a9e5b861a9930af873580d6dc20f773c 21-Oct-2008 The Android Open Source Project <initial-contribution@android.com> Initial Contribution
/frameworks/base/media/java/android/media/SoundPool.java