summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorEric Laurent <elaurent@google.com>2014-11-10 23:28:27 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-11-10 23:28:27 +0000
commit99370d2da54d7537ffda7fef1f6ef36f8b690321 (patch)
tree1ba4953c98fd3eeaa6f9a3fc2ab3e88003da23e4 /include
parentca83dd27f6c662bcbb0cea204c4df7ca77a479fd (diff)
parentae6965ae7664aaea489a8d58358035610075c9af (diff)
downloadframeworks_av-99370d2da54d7537ffda7fef1f6ef36f8b690321.zip
frameworks_av-99370d2da54d7537ffda7fef1f6ef36f8b690321.tar.gz
frameworks_av-99370d2da54d7537ffda7fef1f6ef36f8b690321.tar.bz2
am ae6965ae: am 3aef3560: am e360f0f6: IAudioPolicyService: bound array size in queryDefaultPreProcessing
* commit 'ae6965ae7664aaea489a8d58358035610075c9af': IAudioPolicyService: bound array size in queryDefaultPreProcessing
Diffstat (limited to 'include')
-rw-r--r--include/media/AudioEffect.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/include/media/AudioEffect.h b/include/media/AudioEffect.h
index 05d834d..eef1b41 100644
--- a/include/media/AudioEffect.h
+++ b/include/media/AudioEffect.h
@@ -133,10 +133,11 @@ public:
*
* Returned value
* *descriptor updated with descriptors of pre processings enabled by default
- * *count number of descriptors returned if returned status is N_ERROR.
+ * *count number of descriptors returned if returned status is NO_ERROR.
* total number of pre processing enabled by default if returned status is
* NO_MEMORY. This happens if the count passed as input is less than the number
- * of descriptors to return
+ * of descriptors to return.
+ * *count is limited to kMaxPreProcessing on return.
*/
static status_t queryDefaultPreProcessing(int audioSession,
effect_descriptor_t *descriptors,
@@ -390,6 +391,10 @@ public:
*/
static status_t guidToString(const effect_uuid_t *guid, char *str, size_t maxLen);
+ // kMaxPreProcessing is a reasonable value for the maximum number of preprocessing effects
+ // that can be applied simultaneously.
+ static const uint32_t kMaxPreProcessing = 10;
+
protected:
bool mEnabled; // enable state
int32_t mSessionId; // audio session ID