summaryrefslogtreecommitdiffstats
path: root/core/jni/android_media_ToneGenerator.cpp
Commit message (Collapse)AuthorAgeFilesLines
* More JNI exception-throwing cleanup.Elliott Hughes2011-04-081-3/+3
| | | | | | | | | | | | | There are a few (unimportant) bug fixes here. There were several attempts to throw exceptions in situations where there's already a pending exception. There were also cases where the code was wrong; it was checking for a NULL return from Get*ArrayElements and throwing NPE, but passing NULL is an error that causes a crash and a NULL return means an exception has already been thrown. I didn't want to get into the Scoped* classes just yet, but that was by far the easiest way to fix this. Change-Id: I0b31160ee51b96e82539f6514b8412b149dba7c3
* Fix issue 2203561: Sholes: audio playing out of earpiece.Eric Laurent2009-11-041-1/+1
| | | | | | | | | | | Create a new IAudioTrack interface to AudioFlinger when start() fails due to a broken pipe error. Do the same if start fails due to the same error after time out in obtainBuffer(). Do not indicate that the AudioTrack is started to AudioPolicyManager if IAudioTrack start fails. This avoids that an AudioTrack keeps a dead IAudioTrack after a media server crash. Same modifications for AudioRecord. Add a flag to ToneGenerator indicating that the callback thread can call Java. Without it, when the media server crashes and restarts, the AudioSystem error callback will crash in JNI if the IAudiotrack is created from AudioTrack callback thread.
* Fix issue 1992233: DTMF tones on Sholes is really long.Eric Laurent2009-09-081-3/+3
| | | | | Add a parameter to ToneGenerator.startTone() allowing the caller to specify the tone duration. This is used by the phone application to have a precise control on the DTMF tone duration which was not possible with the use of delayed messaged. Also modified AudioFlinger output threads so that 0s are written to the audio output stream when no more tracks are ready to mix instead of just sleeping. This avoids an issue where the end of a previous DTMF tone could stay in audio hardware buffers and be played just before the beginning of the next DTMF tone.
* auto import from //depot/cupcake/@135843The Android Open Source Project2009-03-031-0/+149
|
* auto import from //depot/cupcake/@135843The Android Open Source Project2009-03-031-149/+0
|
* Code drop from //branches/cupcake/...@124589The Android Open Source Project2008-12-171-1/+1
|
* Initial ContributionThe Android Open Source Project2008-10-211-0/+149