summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorEric Laurent <elaurent@google.com>2014-11-10 23:31:32 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-11-10 23:31:32 +0000
commit6d60079e97c5fd6ba7de7b60adb0a027c0608d19 (patch)
tree9ebbce57d5015eb8ac2356af7ed14b84136b9916 /include
parent995599cbd6ada739c257716a6d8b90eee6d61473 (diff)
parent99370d2da54d7537ffda7fef1f6ef36f8b690321 (diff)
downloadframeworks_av-6d60079e97c5fd6ba7de7b60adb0a027c0608d19.zip
frameworks_av-6d60079e97c5fd6ba7de7b60adb0a027c0608d19.tar.gz
frameworks_av-6d60079e97c5fd6ba7de7b60adb0a027c0608d19.tar.bz2
am 99370d2d: am ae6965ae: am 3aef3560: am e360f0f6: IAudioPolicyService: bound array size in queryDefaultPreProcessing
* commit '99370d2da54d7537ffda7fef1f6ef36f8b690321': 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 4932d40..583695d 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,
@@ -391,6 +392,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