History log of /frameworks/av/media/libmedia/SoundPool.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
df813a3ba59109ca519ce0cb00a1a9144074f40e 21-Jul-2014 Jean-Michel Trivi <jmtrivi@google.com> audio_attributes_t for SoundPool

Add support for the audio_attributes_t structure in the
SoundPoool constructor.
Remove SRC quality which was never implemented.
Remove stream types.

Add file to contain audio helper functions related to policy.

Change-Id: I1720ff15e7b23ea7b713a4395fdfac26dc3fd4da
/frameworks/av/media/libmedia/SoundPool.cpp
34fb29696b0f3abf61b10f8d053b1f33d501de0a 19-Jun-2014 Mark Salyzyn <salyzyn@google.com> libmedia: 64-bit compile warnings

Change-Id: I600f062fa7148c01851023c1240c39939e648002
/frameworks/av/media/libmedia/SoundPool.cpp
bce50bfc3846ab008bafa75c5d3f29fd7b5395f7 28-Feb-2014 Glenn Kasten <gkasten@google.com> Fix type of AudioTrack/AudioRecord parameter frameCount

It's size_t consistently

Change-Id: I29638ef59ac773218025f2403a3508a307b487e0
/frameworks/av/media/libmedia/SoundPool.cpp
4944acb7355b3aa25748fd25945a363a69d65444 19-Aug-2013 Glenn Kasten <gkasten@google.com> Fix whitespace

Change-Id: I9add0872030a26933f6b6dad1be299154611cc56
/frameworks/av/media/libmedia/SoundPool.cpp
1b86fe063badb5f28c467ade39be0f4008688947 29-Jan-2014 Andreas Huber <andih@google.com> FINAL ATTEMPT: HTTP services are now provided from JAVA and made available to media code

Change-Id: I9f74a86e70422187c9cf0ca1318a29019700192d
/frameworks/av/media/libmedia/SoundPool.cpp
7c7be1e05634d96d08210efb4bdeb012ffba440d 20-Dec-2013 Glenn Kasten <gkasten@google.com> Fix some (but not all) unused parameter warnings

Change-Id: Ia99e23a0b46db3f3e6aa46f9018e63c14f4af369
/frameworks/av/media/libmedia/SoundPool.cpp
79c5786cf5a5d572cfcf21c3d40613d86bb4093a 30-Oct-2013 Glenn Kasten <gkasten@google.com> Clean up channel mask handling

Use type audio_channel_mask_t instead of uint32_t.

Use function audio_channel_out_mask_from_count() to convert from channel
count to channel mask instead of hard-coded assumption.

Rename 'channels' to 'channelMask' to avoid confusion with channel count.

Change-Id: I21a85e668458b773d108f95c2381eef9c4816251
/frameworks/av/media/libmedia/SoundPool.cpp
b3cb72a17d9a472883e9e2faa18b42eac533fe99 13-Oct-2013 Eric Laurent <elaurent@google.com> SoundPool: handle new audio track event

If the AudioTrack is torn down, SoundPool will never
receive the buffer end event and the track will stay active
for ever.

The fix consists in stopping the AudioTrack when a new audiotrack
event is received.

Bug: 11193583.
Change-Id: I9876eb2a8f75c601368f669acd67b0accf6e2736
/frameworks/av/media/libmedia/SoundPool.cpp
3d00aa6de95fb46e36f2bab4e3facdf0b96acf06 24-Sep-2013 Eric Laurent <elaurent@google.com> soundpool: allocate shared memory heap by client

Current SoundPool implementation allocates the shared memory heap
containing decoded PCM samples in mediaserver process.
When mediaserver process crashes, the shared memory heaps allocated by
AudioCache cannot be mapped anymore in the new instance of mediaserver.
This causes a silent failure to end playback of new sounds because
AudioFlinger believes the new AudioTracks are opened in streaming mode
and not static mode: it sees a NULL shared memory pointer when the track
is created.

The fix consists in allocating the memory heap in the client process. Thus
the heap is not lost when mediaserver restarts. The global memory usage is
the same as this is shared memory.

Also added a way to detect that a shared memory is passed when the track is
created but cannot be mapped on mediaserver side.

Also fix a crash in SoundPool when ALOGV is enabled.

Bug: 10894793.
Change-Id: Ice6c66ec3b2a409d75dc903a508b6c6fbfb2e8a7
/frameworks/av/media/libmedia/SoundPool.cpp
e2773bb17bc5d01e05a77b8913539575ebd04500 20-Sep-2013 Glenn Kasten <gkasten@google.com> Revert "Workaround slow AudioTrack destruction"

This reverts commit 8bbbd7da02fac3de40139af19f7cf7a7cc3cc824.

Change-Id: I269a6c445cbce33451b6a9e74223e36e6abbdbe0
/frameworks/av/media/libmedia/SoundPool.cpp
8bbbd7da02fac3de40139af19f7cf7a7cc3cc824 18-Sep-2013 Glenn Kasten <gkasten@google.com> Workaround slow AudioTrack destruction

Bug: 10809586
Change-Id: I5f30d4deb1233e8ade8967568e40684ef680c395
/frameworks/av/media/libmedia/SoundPool.cpp
8d0fda9660aee7059f802f400875247b01226084 18-Sep-2013 Glenn Kasten <gkasten@google.com> Partial fix for SoundPool not terminating

SoundPool was waiting for EVENT_UNDERRUN only to indicate end of clip. In
J, AudioTrack delivered both EVENT_UNDERRUN followed by EVENT_BUFFER_END.
However, as of K, AudioTrack is only delivering EVENT_BUFFER_END (this
lack of EVENT_UNDERRUN is another bug which still needs to be fixed).
The workaround is to also respond to EVENT_BUFFER_END in SoundPool.

Bug: 10787103
Change-Id: Id68a23bddd6dd9df6c49c55138197260d71ca468
/frameworks/av/media/libmedia/SoundPool.cpp
8973c0439984f85870dffa7a100580271933c964 11-Sep-2013 Glenn Kasten <gkasten@google.com> Fix SoundPool.play() looping

This is done by configuring SoundPool for shared memory and fast track.
Previously SoundPool used a streaming track, and looping in streaming
mode relied on the ability to loop the most recently enqueued data.
That 'feature' was lost in the new implementation of streaming, so we're
now switching from streaming mode to shared memory mode. Shared memory
mode had always been desired, but was blocked by bug 2801375 which is fixed now.

Bug: 10171337
Change-Id: I2a938e3ffafa2a74d5210b4198b50db20ad5da0e
/frameworks/av/media/libmedia/SoundPool.cpp
1ab85ec401801ef9a9184650d0f5a1639b45eeb9 31-May-2013 Glenn Kasten <gkasten@google.com> Include what is needed

Remove old includes.
Header files only include other header files that they directly need themselves.

Change-Id: Ic471386808d9f42ea19ccbd59cb50a5f83a89dd0
/frameworks/av/media/libmedia/SoundPool.cpp
2799d743ee2ae5a25fe869a7f9c052acc029559f 30-May-2013 Glenn Kasten <gkasten@google.com> Use sp<AudioTrack> instead of raw AudioTrack *

This change prepares for the new implementation of AudioTrack client, which
will require clients to use only sp<AudioTrack>, not raw AudioTrack *.
A raw delete will cause a race condition during AudioTrack destruction.

AudioTrack was made a RefBase by commit b68a91a70bc8d0d18e7404e14443d4e4020b3635
on 2011/11/15, when it was needed by OpenSL ES (for the callback protector).
At that time, the only other client that was also converted from
AudioTrack * to sp<AudioTrack> was android.media.AudioTrack JNI in
project frameworks/base (file android_media_AudioTrack.cpp).

Details:
* Use .clear() instead of delete followed by = NULL.
* ALOG %p need .get().
* sp<> don't need to be listed in constructor initializer, if initially 0.
* Use == 0 for sp<> vs == NULL for raw pointers.
* Use if (sp != 0) instead of if (raw).

Change-Id: Ic7cad25795d6e862e112abdc227b6d33afdfce17
/frameworks/av/media/libmedia/SoundPool.cpp
a6b47a17fb1288936b491f30cd751172a572df5c 19-Nov-2012 Marco Nelissen <marcone@google.com> delete -> free

Strings duplicated with strdup() should be free()d, not deleted.

Change-Id: I42bb3df9625bb8d35f80b02d15364b94c36496f8
/frameworks/av/media/libmedia/SoundPool.cpp
e33054eb968cbf8ccaee1b0ff0301403902deed6 14-Nov-2012 Glenn Kasten <gkasten@google.com> Use size_t for frame counts

Also fix typo: bufferCount should be frameCount.

Change-Id: Ibed539504db75ef99dc21c8ff1bf2987122063a5
/frameworks/av/media/libmedia/SoundPool.cpp
3b16c766d1ae2cfd8487e8ffb2b23936fc0a8e17 14-Nov-2012 Glenn Kasten <gkasten@google.com> Use uint32_t for sample rate

Change-Id: Ie240b48fb54b08359f69ecd4e5f8bda3d15cbe80
/frameworks/av/media/libmedia/SoundPool.cpp
1477e92867a950016579a644e74f803ed1d90cbb 01-May-2012 Glenn Kasten <gkasten@google.com> Enable fast track for SoundPool

Change-Id: Ia80b3a7738e4c5dbe2bd5b0f55f0ca49943e2f64
/frameworks/av/media/libmedia/SoundPool.cpp
0ca3cf94c0dfc173ad7886ae162c4b67067539f6 18-Apr-2012 Eric Laurent <elaurent@google.com> rename audio policy output flags

Change-Id: I27c46bd1d1b2b5f96b87af7d05b951fef18a1312
/frameworks/av/media/libmedia/SoundPool.cpp
559bf2836f5da25b75bfb229fec0d20d540ee426 28-Mar-2012 James Dong <jdong@google.com> AV Android make files changes

o plus a few file relocation: ActivityManager.cpp/h, SoundPool.h, etc
o remove some runtime dependencies to libandroid, libandroid_runtime, etc

Change-Id: I047a47c5fb361dd5cf85cd98798c39f629a75d10
/frameworks/av/media/libmedia/SoundPool.cpp
2e66a7896c9a9da3a15fc6cff9be28b4174d8719 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/av/media/libmedia/SoundPool.cpp