summaryrefslogtreecommitdiffstats
path: root/include/media/AudioEffect.h
Commit message (Collapse)AuthorAgeFilesLines
* Use symbol AUDIO_IO_HANDLE_NONE from <system/audio.h>Glenn Kasten2014-03-261-3/+3
| | | | Change-Id: Id6b1aa17558eb73e17f22b8eab6cd02e00a96dff
* Use symbol AUDIO_SESSION_OUTPUT_MIX from <system/audio.h>Glenn Kasten2014-03-261-5/+6
| | | | Change-Id: I4e48bb7edcc9f9407ee63bb33d029aca02211d74
* Fix clang warnings in AudioFlingerGlenn Kasten2014-02-101-1/+1
| | | | Change-Id: I0fa61025c979709ad7d655bc717df5f194b6089e
* Add support for scaling mode parameterJean-Michel Trivi2012-04-181-12/+9
| | | | | | | | | | | | | | | | | | | | | | Support VISUALIZER_PARAM__SCALING_MODE parameter. Modify process() function to use new volume scaling parameter, used to set whether captured values are maximized by current headroom in the buffer (default existing behaviora) or left as is and thus affected by volume. Modify AudioEffect to allow subclasses to override the following events: control status changed, enable status changed, command executed. In Visualizer class (a subclass of AudioEffect), reset the scaling mode and capture size on the actual effect as cached when control is regained. This will allow the effect to be properly configured whenever Visualizers with different scaling modes or capture sizes are released (e.g. from java release() method). Change-Id: I05cb9f925a296dceca91bafa9fe294ef2b2c2bd5
* Effect UUID inputs passed by pointer are constGlenn Kasten2012-02-081-1/+1
| | | | Change-Id: I1f5c338bcb7368e3dd8cd5f804b2e6d9fbe087f8
* Declare more IAudioFlinger methods constGlenn Kasten2012-02-031-1/+2
| | | | | | | This is just documentation, as C++ method const-ness doesn't mean anything for a binder API. Instead, here const means "no side effects". Change-Id: Iaa9cd2fe477db10ae9a40cac4f79f0faa9b4e5e6
* Use NULL not 0 for raw pointersGlenn Kasten2012-02-031-6/+6
| | | | | | Use if (p != NULL) instead of if (ptr) Change-Id: Iaec3413a59ccbf233c98fcd918cc7d70ac5da9fa
* Added APIs for audio preprocessingEric Laurent2011-07-251-0/+31
| | | | | | | | | | | | | | | Added APIs to control pre processes applied on captured audio. Those APIs are still hidden until reviewed by API council. Three types of standard pre processes are supported: - Automatic Gain Control (AGC) by AutomaticGainControl class - Acoustic Echo Cancellation (AEC) by AcousticEchoCanceler class - Noise Suppression (NS) by NoiseSuppressor class A method is added to AudioEffect class to query audio pre processings applied by default by the platform on a given AudioRecord session ID. Change-Id: I0b9fceeb8c704dd06319c3b52b85c96fe871d51d
* Audio framework: support for audio pre processingEric Laurent2011-07-181-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | Audio effect framework is extended to suport effects on output and input audio path. AudioFlinger: Support for audio effects and effect chains is moved from PlaybackThread class to ThreadBase class so that RecordThread can manage effects. Effects of type pre processing are allowed on record thread only. When a pre processing is enabled, the effect interface handle is passed down to the input stream so that the audio HAL can call the process function. The record thread loop calls the effect chain process function that will only manage the effect state and commands and skip the process function. AudioRecord: The audio session is allocated before calling getInput() into audio policy serice so that the session is known before the input theead is created and pre processings can be created on the correct session. AudioPolicyService: default pre processing for a given input source are loaded from audio_effects.conf file. When an input is created, corresponding effects are created and enabled. Change-Id: Id17119e0979b4dcf189b5c7957fec30dc3478790
* Removed interface to load audio effects librariesEric Laurent2011-05-271-44/+0
| | | | | | | Removed unused functions allowing dynamic loading of audio effects libraries from effects factory API. Change-Id: I06cc5a51dc10aca87c7a8687bbb874babd711eca
* New effect library APIEric Laurent2011-05-271-6/+6
| | | | | | | | | | | | | | | | | Moved and renamed media/EffectApi.h to hardware/audio_effect.h Modified the effect library API to expose a library info structure containing an interface functions table. Also removed enums for audio channels, audio format and devices from effect API and use values from system/audio.h instead. Modified effects factory to support new library interface format and load libraries and efffects listed in audio_effects.conf file. The file audio_effects.conf is first loaded from /vendor/etc and then from /system/etc/audio_effects.conf if not found. Modified existing effect libraries to implement the new library interface. Change-Id: Ie52351e071b6d352fa2fbc06c3846686f8c45df9
* Fix issue 3157123.Eric Laurent2010-11-191-1/+2
| | | | | | | Use a Mutex wherever atomic operations were used in AudioTrack, AudioRecord, AudioFlinger and AudioEffect classes. Change-Id: I6f55b2cabdcd93d64ef19446735b8f33720f8dbc
* Audio effects: modified command() parameter types.Eric Laurent2010-07-281-7/+11
| | | | | | | The type of the cmd, cmdSize and *pReplySize parameters of the effect control interface command() function have been modified from int to uint32_t. This is more consistent with their role. Change-Id: I84d289fc262d6753747910f06f485597dfee6591
* Added Visualizer effect.Eric Laurent2010-07-071-33/+37
| | | | | | | | | | | | | | 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
* Various fixes and improvements in audio effects implementationEric Laurent2010-06-251-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Effect API: - Use different definitions for audio device, channels, formats... in AudioSystem and EffectApi: Removed media/AudioCommon.h file created for initial version of EffectApi - Indicate audio session and output ID to effect library when calling EffectCreate(). Session ID can be useful to optimize the implementation of effect chains in the same audio session. Output ID can be used for effects implemented in audio hardware. - Renamed EffectQueryNext() function to EffectQueryEffect() and changed operating mode: now an index is passed for the queried effect instead of implicitly querying the next one. - Added CPU load and memory usage indication in effects descriptor - Added flags and commands to indicate changes in audio mode (ring tone, in call...) to effect engine - Added flag to indicate hardware accelerated effect implementation. - Renamed EffectFactoryApi.h to EffectsFactoryApi.h for consistency with EffectsFactory.c/h Effect libraries: - Reflected changes in Effect API - Several fixes in reverb implementation - Added build option TEST_EFFECT_LIBRARIES in makefile to prepare integration of actual effect library. - Replaced pointer by integer identifier for library handle returned by effects factory Audio effect framework: - Added support for audio session -1 in preparation of output stage effects configuration. - Reflected changes in Effect API - Removed volume ramp up/down when effect is inserted/removed: this has to be taken care of by effect engines. - Added some overflow verification on indexes used for deferred parameter updates via shared memory - Added hardcoded CPU and memory limit check when creating a new effect instance Change-Id: I43fee5182ee201384ea3479af6d0acb95092901d
* Issue 2667802: [Audio Effect Framework] AudioEffect base class and JNI.Eric Laurent2010-06-111-0/+462
Added AudioEffect C++ class. AudioEffect is the base class for effect specific implementations, OpenSL ES effect interfaces and audio effect JNI. Added the AudioEffect JNI and AudioEffect JAVA class. AudioEffect is the base class to implement more specific JAVA classes to control audio effects from JAVA applications. Change-Id: If300a1b708f2e6605891261e67bfb4f8330a4624