From 1b6c677c4bad5c1aea4f01277cf5aa234ad4cab4 Mon Sep 17 00:00:00 2001 From: Eric Laurent Date: Mon, 10 Sep 2012 16:27:35 -0700 Subject: Limit maximum equalizer gain. Limit maximum gain in all EQ bands according to current volume so that total gain (current volume + band gain) does not exceed a certain limit. The gain difference between bands is preserved. Change-Id: Ice5a9705a0b3353e8778b4c539a29ca9cdf60390 --- media/libeffects/lvm/wrapper/Bundle/EffectBundle.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'media/libeffects/lvm/wrapper/Bundle/EffectBundle.h') diff --git a/media/libeffects/lvm/wrapper/Bundle/EffectBundle.h b/media/libeffects/lvm/wrapper/Bundle/EffectBundle.h index 5634ca1..9c58ecd 100644 --- a/media/libeffects/lvm/wrapper/Bundle/EffectBundle.h +++ b/media/libeffects/lvm/wrapper/Bundle/EffectBundle.h @@ -38,6 +38,7 @@ extern "C" { #define VOLUME_CUP_LOAD_ARM9E 0 // Expressed in 0.1 MIPS #define BUNDLE_MEM_USAGE 25 // Expressed in kB //#define LVM_PCM +#define MAX_BAND_GAIN_DB 4 #ifndef OPENSL_ES_H_ static const effect_uuid_t SL_IID_VOLUME_ = { 0x09e8ede0, 0xddde, 0x11db, 0xb4f6, @@ -95,6 +96,7 @@ struct BundledEffectContext{ int SamplesToExitCountVirt; LVM_INT16 *workBuffer; int frameCount; + int32_t bandGaindB[FIVEBAND_NUMBANDS]; #ifdef LVM_PCM FILE *PcmInPtr; FILE *PcmOutPtr; -- cgit v1.1