summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorEric Laurent <elaurent@google.com>2014-11-05 12:15:36 -0800
committerEric Laurent <elaurent@google.com>2014-11-10 19:43:46 +0000
commite360f0f6cad290f69e07fd3a20dcf11a1dbc4160 (patch)
tree6e19a985df2a12cf74d713b689556cfc735f0088 /include
parent96016c2d583ccca9fffd6974cb9473f7effd6cf5 (diff)
downloadframeworks_av-e360f0f6cad290f69e07fd3a20dcf11a1dbc4160.zip
frameworks_av-e360f0f6cad290f69e07fd3a20dcf11a1dbc4160.tar.gz
frameworks_av-e360f0f6cad290f69e07fd3a20dcf11a1dbc4160.tar.bz2
IAudioPolicyService: bound array size in queryDefaultPreProcessing
Bug: 18226810. Change-Id: Ib8e2bfe835a8681aac50bf23161db14e50c9a124 (cherry picked from commit 74adca9ad30b7f8a70d40c5237bade0d16c4ea58)
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