Modifications in audio effect engine state management.
- Separate the updating of effect engine state from the process call in EffectModule so that the state
of all effects in the same effect chain is updated simultaneusly before all process functions are called.
- Added a mechanism for the effect engine to continue being called for processing after receiving the disable
commands untils it considers that the framework can stop calling the process function without causing
a glitch or loosing some effect tail.
- Updated test reverb and equalizer to support this new feature
Change-Id: Icb56ae2c84c076d4dbad6cf733b1a62f823febe7
diff --git a/media/libeffects/EffectReverb.h b/media/libeffects/EffectReverb.h
index 5af316d..ee8e390 100644
--- a/media/libeffects/EffectReverb.h
+++ b/media/libeffects/EffectReverb.h
@@ -114,6 +114,12 @@
#define AP1_GAIN_RANGE (int)(22936-6553)
+enum reverb_state_e {
+ REVERB_STATE_UNINITIALIZED,
+ REVERB_STATE_INITIALIZED,
+ REVERB_STATE_ACTIVE,
+};
+
/* parameters for each allpass */
typedef struct
{
@@ -279,6 +285,7 @@
uint16_t m_Aux; // if TRUE, is connected as auxiliary effect
uint16_t m_Preset; // if TRUE, expose preset revert interface
+ uint32_t mState;
} reverb_object_t;