History log of /frameworks/base/media/jni/soundpool/SoundPoolThread.h
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
1f1f4bf91dd66fba527bf4d8765e484e08ddb971 11-Apr-2016 Philip Cuadra <philipcuadra@google.com> Increase the SoundPoolThread queue size to 128 entries.

SoundPoolThread queue is undersized, bump it up to 128 entries. This
improves the performance of loading camera by unblocking the thread that
asks SoundPool to load sounds. Longer term, an API for setting this
number of entries should be added.

Bug: 28087906

Change-Id: Ie5cea5d11844cf035ca13979c188f2c57a8e333a
/frameworks/base/media/jni/soundpool/SoundPoolThread.h
372be8970c6ab68c295fb74dbb878ab1d443d90e 04-Dec-2014 Marco Nelissen <marcone@google.com> Make SoundPool use MediaCodec

Bug: 18239054
Change-Id: Ia144fc1bbb0d2787638ee972e2224339b4965310
/frameworks/base/media/jni/soundpool/SoundPoolThread.h
f5e18125498b768d4528e4d1c19533c2b16f338b 26-Mar-2012 Eric Laurent <elaurent@google.com> reorganize SoundPool and JetPlayer code.

Reorganize SoundPool and JetPlayer code to be ready for the
creation of libmedia_native.

Split SoundPool between libsoundpool (JNI) and libmedia(sound pool implementation).
Remove dependencies on nativehelper/jni.h from JetPlayer.

Change-Id: I130c6014173b714329929dd82c5dfb70b757a610
/frameworks/base/media/jni/soundpool/SoundPoolThread.h
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/jni/soundpool/SoundPoolThread.h
f6e43bf29084760b39257b2273e0f04c2815fdc5 08-Dec-2009 Dave Sparks <davidsparks@android.com> Add OnLoadCompleteListener to SoundPool.
/frameworks/base/media/jni/soundpool/SoundPoolThread.h
9066cfe9886ac131c34d59ed0e2d287b0e3c0087 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
/frameworks/base/media/jni/soundpool/SoundPoolThread.h
d83a98f4ce9cfa908f5c54bbd70f03eec07e7553 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
/frameworks/base/media/jni/soundpool/SoundPoolThread.h
54b6cfa9a9e5b861a9930af873580d6dc20f773c 21-Oct-2008 The Android Open Source Project <initial-contribution@android.com> Initial Contribution
/frameworks/base/media/jni/soundpool/SoundPoolThread.h