History log of /frameworks/base/media/jni/audioeffect/android_media_Visualizer.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
2279b2534272282a5b5152723235da397e49195c 19-Jul-2017 Steven Moreland <smoreland@google.com> frameworks/base: use proper nativehelper headers

libnativehelper exports headers under nativehelper. These were
available before incorrectly as global headers in order to give
access to jni.h.

Test: modules using frameworks/base find headers
Bug: 63762847
Change-Id: I0f9f231acdebe460f279135462f43d3e32eff64d
/frameworks/base/media/jni/audioeffect/android_media_Visualizer.cpp
889f9952d8aa438d5aef6fea9046eddb38ea11b0 17-Jul-2017 Steven Moreland <smoreland@google.com> Reference nativehelper/jni.h as jni.h

nativehelper will no longer export nativehelper/jni.h so that everywhere
can reference this file with the same name.

Bug: 63762847
Change-Id: I8d2e9587439efa2d6ab03a5bdfa749fc620759e1
/frameworks/base/media/jni/audioeffect/android_media_Visualizer.cpp
addb7af2c082e68f582035e6a71d3af922c31b7e 16-Sep-2016 rago <rago@google.com> resolve merge conflicts of a80bdc3 to nyc-mr1-dev-plus-aosp

Change-Id: If5b6322e611cc1171f767d48001d9672bfd0024d
8dc9afa9666507930f30ec0d11e2dba7db2ae142 15-Sep-2016 rago <rago@google.com> Fix scope for visualizer object release

Bug: 30684284
Change-Id: I4170511c6c7f36aa1bce3e439054bc6b8a4a2623
/frameworks/base/media/jni/audioeffect/android_media_Visualizer.cpp
c8e1206ad57f5a359b1e4a193f50f143c9028439 07-Jun-2016 Eric Laurent <elaurent@google.com> Merge "Delete Visualizer before lpJniStorage" am: 03c209b2a3
am: 913e2f83b2

* commit '913e2f83b223486ac1461dab86758848f9ad08e1':
Delete Visualizer before lpJniStorage

Change-Id: I76aa735d8f0a100e0e106050c90966bd003235bc
7b9f5be9149dc84cd16842757ee6fe04f3092dc1 06-Jun-2016 ganxiaolin <ganxiaolin@xiaomi.com> Delete Visualizer before lpJniStorage

It is related to Change: Id17bea8a6ca7132042b9bfefed398a715c139be7
Fix ANR because of bug of Visualizer.
If lpJniStorage was delete first, callback_data_lock become a invalid value.
At mReceiver.periodicCapture() in CaptureThread, it will lock callback_data_lock.
Thus, CaptureThread will wait a invalid memory forever and visualizer wait CaptureThread exiting and causing ANR.

Signed-off-by: ganxiaolin <ganxiaolin@xiaomi.com>
/frameworks/base/media/jni/audioeffect/android_media_Visualizer.cpp
0b5608015b1175c52acbcb97ca8337cde7d66397 24-May-2016 Chih-Hung Hsieh <chh@google.com> Merge "Fix misc-macro-parentheses warnings in audio media jni." am: 9ecb10d1b5
am: ca3f49d594

* commit 'ca3f49d594f5c00e6b5d6817bcdb0af02e7224e6':
Fix misc-macro-parentheses warnings in audio media jni.

Change-Id: I3828c9720f7fe91bc60058daeca2d598f0302d32
0ca16ef3b8f42f74fdd3d32e7826f9df670bdf90 20-May-2016 Chih-Hung Hsieh <chh@google.com> Fix misc-macro-parentheses warnings in audio media jni.

Bug: 28705665
Change-Id: Iff476943a0a2c2ae68778d1f4bca5d3e9e04bd26
/frameworks/base/media/jni/audioeffect/android_media_Visualizer.cpp
33b840444f5a481dd31e129079d3c0cf3acdf80e 08-Mar-2016 Glenn Kasten <gkasten@google.com> Use audio_session_t consistently

Also prefer AudioManager.AUDIO_SESSION_ID_GENERATE over
AudioSystem.AUDIO_SESSION_ALLOCATE, because
AudioSystem.AUDIO_SESSION_ALLOCATE is @hide.

Bug: 27562099
Change-Id: I5924554feb919db7f2390f5b062faedd515421af
/frameworks/base/media/jni/audioeffect/android_media_Visualizer.cpp
b57dd722f1dc0663417da37d3a82f8283ad3c982 24-Sep-2015 Elliott Hughes <enh@google.com> resolved conflicts for a884d81e to stage-aosp-master

Change-Id: Ice485967fa96f13786024b6939b826638e906ff0
76f6a86de25e1bf74717e047e55fd44b089673f3 19-Sep-2015 Daniel Micay <danielmicay@gmail.com> constify JNINativeMethod function pointer tables

Change-Id: I4036c924958221cbc644724f8eb01c5de3cd7954
/frameworks/base/media/jni/audioeffect/android_media_Visualizer.cpp
077999844f306d31d3ea9593b7e7b2f06e7f7483 19-Jun-2015 Eric Laurent <elaurent@google.com> audio effect JNI: fix global ref leak.

Remove one more global ref leak in AudioEffect
and Visualizer JNI.

Bug: 21629892.
Change-Id: Id77fc2d10f3dc9d3154d6a1cf0f8cc0f83683584
/frameworks/base/media/jni/audioeffect/android_media_Visualizer.cpp
76f81331886c0972e5f7432e4edd8c36ef1048e6 05-Jun-2015 Eric Laurent <elaurent@google.com> Use only strong references to AudioEffect

Modify AudioEffect and Visualizer JNI to use strong references to
native AudioEffect object.

Bug: 21629892.

Change-Id: I4c2dea0b2e16d807d6dc5d6b09e02e4652d48873
/frameworks/base/media/jni/audioeffect/android_media_Visualizer.cpp
fa5ecdc4ac6d7a8db2bb9e4a6a60a3189025df30 28-Apr-2015 Svet Ganov <svetoslavganov@google.com> Respect the record audio app op - framework

Change-Id: I5696d2ef22738ccffaf8bd7a0ee68cbc3dea3bf1
/frameworks/base/media/jni/audioeffect/android_media_Visualizer.cpp
8bd6a203ca753e9181564221e4faf7703d520b78 31-Dec-2014 Haitao Feng <haitao.feng@intel.com> Use NULL instead of 0 for pointer arguments of CallStaticVoidMethod.

CallStaticVoidMethod is varargs function, and calling it with
a literal 0 like CallStaticVoidMethod(..., 0) will treat the
argument as a 4 byte int in both 32 and 64 bit processes.

This is incorrect for pointer arguments where NULL should be
used instead.

Reviewed-by: Liao, Bruce <bruce.liao@intel.com>
Signed-off-by: Yong Yao <yong.yao@intel.com>

Change-Id: I9d700d3790a80dbee6826f64baf9ef5d81ca390f
/frameworks/base/media/jni/audioeffect/android_media_Visualizer.cpp
5a15d0d31b877ef512b3379eac033c6bb041c86a 11-Nov-2014 Andreas Gampe <agampe@google.com> Frameworks/base: Wall Werror in media/jni

Turn on -Wall -Werror in media/jni. Fix warnings.

Change-Id: I9da54ad379d8172ee535b52ee2b0637a2533f4e3
/frameworks/base/media/jni/audioeffect/android_media_Visualizer.cpp
ea7861c918567d17d40a762b38f97c053d88b839 17-Dec-2013 Ashok Bhat <ashok.bhat@arm.com> AArch64: Use long for pointers in audio effect classes

For storing pointers, long is used in AudioEffect
and Visualizer 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: Ief49bbe5baef663e268c7f6d70ac33a4df45621c
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>
/frameworks/base/media/jni/audioeffect/android_media_Visualizer.cpp
badca26cb218852d32862dada36ee52fce865ad2 20-Sep-2013 Jean-Michel Trivi <jmtrivi@google.com> Add audio level monitoring capabilities in Visualizer effect

Extend the visualizer audio effect with the capability to query
peak and RMS values for the currently playing audio.
Values are expressed in mB and are retrieved as an array of
int values in the native layer, and written directly as
object fields for the JNI.

Bug 8413913

Change-Id: I808075a18e61f85c566544a2bdaae10e5c4a644b
/frameworks/base/media/jni/audioeffect/android_media_Visualizer.cpp
67a12184776605b6e6ddc01ca91b533a2e37a40b 26-Apr-2013 Mike J. Chen <mjchen@google.com> Fix a crash case

There's a runtime check for a bad argument, but it is
after the usage of the bad argument. Move the usage
after the check.

Bug 8687716

Change-Id: Iddfa457951bac69b436a430cda21b5d7a563107b
Signed-off-by: Mike J. Chen <mjchen@google.com>
/frameworks/base/media/jni/audioeffect/android_media_Visualizer.cpp
e1123e7f36723a8b888501c9a22a589297849ca2 16-Apr-2012 Jean-Michel Trivi <jmtrivi@google.com> Add support for scaling mode parameter in Visualizer effect

Add set/get methods to set how the Visualizer scales the captured
data.

Change-Id: Ia1da00fd5474dd3484b59caf7d1d0a812d0347de
/frameworks/base/media/jni/audioeffect/android_media_Visualizer.cpp
3540a0197f56c4bcd7d7419f4502bfca34257de2 11-Jan-2012 John Grossman <johngro@google.com> Enhance Visualizer behavior in the case of mediaserver death.

Bring the Visualizer class into line with the SDK documentation by
returning ERROR_DEAD_OBJECT instead of ERROR_INVALID_OPERATION when
the Visualizer loses its binder connection to the mediaserver because
of a mediaserver restart.

Also add a new callback interface to allow clients to be
asynchronously notified in the case of server death. Right now, the
interface definition and the registration method are flagged as hidden
pending API council review/approval.

See http://b/issue?id=5717519 for details.

Change-Id: Ic15856f27ed5a950a583ac11ca81f79bd7e9b1a0
Signed-off-by: John Grossman <johngro@google.com>
/frameworks/base/media/jni/audioeffect/android_media_Visualizer.cpp
449725f9aa67136a38c7554ba76ac4e27e5e3bd3 10-Jan-2012 John Grossman <johngro@google.com> Reuse callback buffers in the Visualizer.

Don't re-allocate buffers used by Visualizer callbacks as this causes an
unacceptable amount of GC thrash. Instead, lazily allocate the buffers and only
reallocate them when the required size changes.

See http://b/issue?id=5717519 for details.

Change-Id: Ibd157ed51f30687ce7c4ef0b4003258a484e0f5d
Signed-off-by: John Grossman <johngro@google.com>
/frameworks/base/media/jni/audioeffect/android_media_Visualizer.cpp
3762c311729fe9f3af085c14c5c1fb471d994c03 06-Jan-2012 Steve Block <steveblock@google.com> Rename (IF_)LOGE(_IF) to (IF_)ALOGE(_IF) DO NOT MERGE

See https://android-git.corp.google.com/g/#/c/157220

Bug: 5449033
Change-Id: Ic9c19d30693bd56755f55906127cd6bd7126096c
/frameworks/base/media/jni/audioeffect/android_media_Visualizer.cpp
8564c8da817a845353d213acd8636b76f567b234 06-Jan-2012 Steve Block <steveblock@google.com> Rename (IF_)LOGW(_IF) to (IF_)ALOGW(_IF) DO NOT MERGE

See https://android-git.corp.google.com/g/157065

Bug: 5449033
Change-Id: I00a4b904f9449e6f93b7fd35eac28640d7929e69
/frameworks/base/media/jni/audioeffect/android_media_Visualizer.cpp
71f2cf116aab893e224056c38ab146bd1538dd3e 20-Oct-2011 Steve Block <steveblock@google.com> Rename (IF_)LOGV(_IF) to (IF_)ALOGV(_IF) DO NOT MERGE

See https://android-git.corp.google.com/g/#/c/143865

Bug: 5449033
Change-Id: I0122812ed6ff6f5b59fe4a43ab8bff0577adde0a
/frameworks/base/media/jni/audioeffect/android_media_Visualizer.cpp
cc02ac54ac0758e6f44b2d8e5134ff1b2fa96409 23-Oct-2010 Eric Laurent <elaurent@google.com> Fix issue 3126094.

android_media_Visualizer.cpp:
Delete local reference to jArray in captureCallback() in
the case of waveform capture.

Change-Id: Ia822ab6d9945fff93605f7732e56120c19fd42a5
/frameworks/base/media/jni/audioeffect/android_media_Visualizer.cpp
2fb43ef8c0b922c1bd0d7cb6867e30d702d4bdb8 24-Sep-2010 Eric Laurent <elaurent@google.com> fix problem in AudioEffect JNI setup.

There is a problem in AudioEffect and Visualizer native_setup() methods
that causes a crash in the application after the mediaserver process
has crashed and restarted.
The problem is that the native AudioEffect/Visualizer constructor is
called while the JNI is in critical state after calling
GetPrimitiveArrayCritical(). As the mediaserver process just restarted, the
first call to AudioSystem will cause the binder IAudioflinger interface to
be reteived and a callback send to AudioSystem JNI to clear the mediaserver
error state. This will call env->FindClass() and crash due to the JNI being
in critical state.

Also fixed a similar problem in AudioTrack JNI

Change-Id: I4a9026a3e26c7f78d9b4b4bec1aac90fbee2ab62
/frameworks/base/media/jni/audioeffect/android_media_Visualizer.cpp
1a5149e5d7f2dddc8b324f7695e69fd89af73c52 22-Sep-2010 Eric Laurent <elaurent@google.com> Fix issue 3022800.

- Created sub-package android.media.audiofx for audio effects.
- Hid AudioEffect class contructor, methods and variables not needed by
applications
- Added more javadoc comments for AudioEffect Class

Change-Id: Ibbb40d4e714bb248aa32cf82d7763d74efae96d1
/frameworks/base/media/jni/audioeffect/android_media_Visualizer.cpp
df9b81ced437b11f8a3fcf4ba3ea6af703d121e2 02-Jul-2010 Eric Laurent <elaurent@google.com> Added Visualizer effect.

The visualizer enables application to retrieve part of the currently playing audio for visualization purpose.
It is not an audio recording interface and only returns partial and low quality audio content as a waveform or
a frequency representation (FFT).

Removed temporary hack made in MediaPlayer for animated wall papers based on audio visualization (snoop() method.

This commit also includes a change in AudioEffect class:
- the enable()/disable() methods have been replaced bya more standard setEnabled() method.
- some fixes in javadoc

Change-Id: Id092a1340e9e38dae68646ade7be054e3a36980e
/frameworks/base/media/jni/audioeffect/android_media_Visualizer.cpp