summaryrefslogtreecommitdiffstats
path: root/include/media/EffectApi.h
diff options
context:
space:
mode:
authorEric Laurent <elaurent@google.com>2010-07-09 13:34:17 -0700
committerEric Laurent <elaurent@google.com>2010-07-13 12:27:18 -0700
commit7d850f23c857fe0c0deec9b9ea593d3029665a16 (patch)
treec5b885b890b6707a42a0f54cb4f2e3d4b7e6eacd /include/media/EffectApi.h
parente339464f1c8efe7e53b761cf44ff5be6e537ecad (diff)
downloadframeworks_base-7d850f23c857fe0c0deec9b9ea593d3029665a16.zip
frameworks_base-7d850f23c857fe0c0deec9b9ea593d3029665a16.tar.gz
frameworks_base-7d850f23c857fe0c0deec9b9ea593d3029665a16.tar.bz2
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
Diffstat (limited to 'include/media/EffectApi.h')
-rw-r--r--include/media/EffectApi.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/media/EffectApi.h b/include/media/EffectApi.h
index b4d738c..9f3d0b6 100644
--- a/include/media/EffectApi.h
+++ b/include/media/EffectApi.h
@@ -223,6 +223,11 @@ typedef struct audio_buffer_s audio_buffer_t;
// samples as specified in output buffer descriptor. If the buffer descriptor
// is not specified the function must use either the buffer or the
// buffer provider function installed by the EFFECT_CMD_CONFIGURE command.
+// The effect framework will call the process() function after the EFFECT_CMD_ENABLE
+// command is received and until the EFFECT_CMD_DISABLE is received. When the engine
+// receives the EFFECT_CMD_DISABLE command it should turn off the effect gracefully
+// and when done indicate that it is OK to stop calling the process() function by
+// returning the -ENODATA status.
//
// NOTE: the process() function implementation should be "real-time safe" that is
// it should not perform blocking calls: malloc/free, sleep, read/write/open/close,
@@ -239,6 +244,8 @@ typedef struct audio_buffer_s audio_buffer_t;
//
// Output:
// returned value: 0 successful operation
+// -ENODATA the engine has finished the disable phase and the framework
+// can stop calling process()
// -EINVAL invalid interface handle or
// invalid input/output buffer description
////////////////////////////////////////////////////////////////////////////////