summaryrefslogtreecommitdiffstats
path: root/core/jni/android_media_ToneGenerator.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Frameworks/base: Consistency in core/jniAndreas Gampe2014-11-211-15/+4
| | | | | | | | Make consistent use of core_jni_helpers for registration. Translate some #ifdefs into const bools. Change-Id: I37639aa053dd50f003a552cbd8550dddecc811c5
* AArch64: Use long for pointers in media classesAshok Bhat2014-01-151-18/+18
| | | | | | | | | | | | | | For storing pointers, long is used in media classes, as native pointers can be 64-bit. In addition, some minor changes have been done to conform with standard JNI practice (e.g. use of jint instead of int in JNI function prototypes) Change-Id: Idc4ca0124d03df7f9cef412488abafd020e5e774 Signed-off-by: Ashok Bhat <ashok.bhat@arm.com> Signed-off-by: Marcus Oakland <marcus.oakland@arm.com> Signed-off-by: Kévin PETIT <kevin.petit@arm.com>
* am 2326be4f: am ba97ad2a: Merge "Leak in ToneGenerator_native_setup"Glenn Kasten2012-12-201-0/+1
|\ | | | | | | | | * commit '2326be4fa9cb3b523a3ea13875e91bdc437da33d': Leak in ToneGenerator_native_setup
| * Leak in ToneGenerator_native_setupYou Kim2012-12-071-0/+1
| | | | | | | | | | | | | | Failure in ToneGenerator::isInit causes a leak. lpToneGen should be deleted. Change-Id: I48df7a328fed01be8412d5449ee0753dad3c101f
* | new can't fail on AndroidGlenn Kasten2012-12-031-5/+0
|/ | | | Change-Id: I0e048d3d8ba1ec34d13684b9fd898035d3381db8
* implemented synchronous audio captureEric Laurent2012-03-291-0/+11
| | | | | | | | | | | | | | Added the infrastructure to support the synchronization of playback and capture actions on specific events. The first requirement for this feature is to synchronize the audio capture start with the full rendering of a given audio content. The applications can further be extended to other use cases (synchronized playback start...) by adding new synchronization events and new synchronous control methods on player or recorders. Also added a method to query the audio session from a ToneGenerator. Change-Id: I4e47f5108c7cbbd3bd334a7fad9b3b6c5ba55d88
* Use correct syntax for #include <> ""Glenn Kasten2012-03-131-6/+6
| | | | Change-Id: I943137108668ae66f8eba18dafe069a7951bcd8f
* Update commentsGlenn Kasten2012-02-141-1/+1
| | | | | | We no longer put the filename at start of file. Change-Id: Ic435b159a23105681e3d4a6cb1ac097bc853302e
* Follow raw pointer and sp<> conventionsGlenn Kasten2012-02-101-3/+1
| | | | | | | | Unconditional delete for raw pointers. Use "if (sp != 0)" not "if (sp.get() != 0)" or "if (sp != NULL)". Use "if (raw != NULL)" not "if (raw)". Change-Id: I531a8da7c37149261ed2f34b862ec4896a4b785b
* No newline or space at end of ALOG format stringGlenn Kasten2012-02-081-12/+12
| | | | Change-Id: I0bef580cbc818cb7c87aea23919d26f1446cec32
* Use ToneGenerator::tone_type consistentlyGlenn Kasten2012-01-271-1/+1
| | | | | | | Also remove defaults in startToneCommand(), they're not needed and the default for tone type was nonsense. Change-Id: I70fa8cee4f3dbb8c66ceb3719c8d3d2f447f05b9
* Use audio_stream_type_t consistentlyGlenn Kasten2012-01-131-1/+1
| | | | | | | | | At native level it was a mixture of audio_stream_type_t, int, uint32_t, and uint8_t. Java is still int. Also fixed a couple of hard-coded -1 instead of AUDIO_STREAM_DEFAULT, and in startToneCommand a hard-coded 0 instead of AUDIO_STREAM_VOICE_CALL. Change-Id: Ia33bfd70edca8c2daec9052984b369cd8eee2a83
* Rename (IF_)LOGE(_IF) to (IF_)ALOGE(_IF) DO NOT MERGESteve Block2012-01-081-4/+4
| | | | | | | See https://android-git.corp.google.com/g/#/c/157220 Bug: 5449033 Change-Id: Ic9c19d30693bd56755f55906127cd6bd7126096c
* Rename (IF_)LOGV(_IF) to (IF_)ALOGV(_IF) DO NOT MERGESteve Block2011-10-261-10/+10
| | | | | | | See https://android-git.corp.google.com/g/#/c/143865 Bug: 5449033 Change-Id: I0122812ed6ff6f5b59fe4a43ab8bff0577adde0a
* 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