| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
This reverts commit 8bbbd7da02fac3de40139af19f7cf7a7cc3cc824.
Change-Id: I269a6c445cbce33451b6a9e74223e36e6abbdbe0
|
|
|
|
|
| |
Bug: 10809586
Change-Id: I5f30d4deb1233e8ade8967568e40684ef680c395
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
Remove old includes.
Header files only include other header files that they directly need themselves.
Change-Id: Ic471386808d9f42ea19ccbd59cb50a5f83a89dd0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
Strings duplicated with strdup() should be free()d, not deleted.
Change-Id: I42bb3df9625bb8d35f80b02d15364b94c36496f8
|
|
|
|
|
|
| |
Also fix typo: bufferCount should be frameCount.
Change-Id: Ibed539504db75ef99dc21c8ff1bf2987122063a5
|
|
|
|
| |
Change-Id: Ie240b48fb54b08359f69ecd4e5f8bda3d15cbe80
|
|
|
|
| |
Change-Id: Ia80b3a7738e4c5dbe2bd5b0f55f0ca49943e2f64
|
|
|
|
| |
Change-Id: I27c46bd1d1b2b5f96b87af7d05b951fef18a1312
|
|
|
|
|
|
|
| |
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
|
|
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
|