From e1315cf0b63b4c14a77046519e6b01f6f60d74b0 Mon Sep 17 00:00:00 2001 From: Eric Laurent Date: Tue, 17 May 2011 19:16:02 -0700 Subject: New effect library API 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 --- media/libeffects/testlibs/EffectReverb.h | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'media/libeffects/testlibs/EffectReverb.h') diff --git a/media/libeffects/testlibs/EffectReverb.h b/media/libeffects/testlibs/EffectReverb.h index dbcd192..a239814 100644 --- a/media/libeffects/testlibs/EffectReverb.h +++ b/media/libeffects/testlibs/EffectReverb.h @@ -40,7 +40,7 @@ if the buffer size is a power of two. ) #define NUM_OUTPUT_CHANNELS 2 -#define OUTPUT_CHANNELS CHANNEL_STEREO +#define OUTPUT_CHANNELS AUDIO_CHANNEL_OUT_STEREO #define REVERB_BUFFER_SIZE_IN_SAMPLES_MAX 16384 @@ -306,19 +306,22 @@ int EffectQueryEffect(uint32_t index, int EffectCreate(effect_uuid_t *effectUID, int32_t sessionId, int32_t ioId, - effect_interface_t *pInterface); -int EffectRelease(effect_interface_t interface); + effect_handle_t *pHandle); +int EffectRelease(effect_handle_t handle); +int EffectGetDescriptor(effect_uuid_t *uuid, + effect_descriptor_t *pDescriptor); -static int Reverb_Process(effect_interface_t self, +static int Reverb_Process(effect_handle_t self, audio_buffer_t *inBuffer, audio_buffer_t *outBuffer); -static int Reverb_Command(effect_interface_t self, +static int Reverb_Command(effect_handle_t self, uint32_t cmdCode, uint32_t cmdSize, void *pCmdData, uint32_t *replySize, void *pReplyData); - +static int Reverb_GetDescriptor(effect_handle_t self, + effect_descriptor_t *pDescriptor); /*------------------------------------ * internal functions -- cgit v1.1