summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Kasten <gkasten@google.com>2012-10-30 10:36:00 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2012-10-30 10:36:00 -0700
commit0eac0714e9fbd6e43b1fd13a38131800b2a81377 (patch)
tree7b9efe8dc4926a401c0dc64248096a54b97fe20c
parentdb3a20ea484514f7f23d4ef3c30fe4780ab940d2 (diff)
parent599fabc596687efa4b71b8f3ebbb957c7cae0c72 (diff)
downloadframeworks_av-0eac0714e9fbd6e43b1fd13a38131800b2a81377.zip
frameworks_av-0eac0714e9fbd6e43b1fd13a38131800b2a81377.tar.gz
frameworks_av-0eac0714e9fbd6e43b1fd13a38131800b2a81377.tar.bz2
Merge "Document AudioMixer hard-coded limits"
-rw-r--r--services/audioflinger/AudioMixer.cpp6
-rw-r--r--services/audioflinger/AudioMixer.h7
2 files changed, 13 insertions, 0 deletions
diff --git a/services/audioflinger/AudioMixer.cpp b/services/audioflinger/AudioMixer.cpp
index e652d14..a4ed445 100644
--- a/services/audioflinger/AudioMixer.cpp
+++ b/services/audioflinger/AudioMixer.cpp
@@ -106,6 +106,12 @@ AudioMixer::AudioMixer(size_t frameCount, uint32_t sampleRate, uint32_t maxNumTr
ALOG_ASSERT(maxNumTracks <= MAX_NUM_TRACKS, "maxNumTracks %u > MAX_NUM_TRACKS %u",
maxNumTracks, MAX_NUM_TRACKS);
+ // AudioMixer is not yet capable of more than 32 active track inputs
+ ALOG_ASSERT(32 >= MAX_NUM_TRACKS, "bad MAX_NUM_TRACKS %d", MAX_NUM_TRACKS);
+
+ // AudioMixer is not yet capable of multi-channel output beyond stereo
+ ALOG_ASSERT(2 == MAX_NUM_CHANNELS, "bad MAX_NUM_CHANNELS %d", MAX_NUM_CHANNELS);
+
LocalClock lc;
pthread_once(&sOnceControl, &sInitRoutine);
diff --git a/services/audioflinger/AudioMixer.h b/services/audioflinger/AudioMixer.h
index dc468ff..e60a298 100644
--- a/services/audioflinger/AudioMixer.h
+++ b/services/audioflinger/AudioMixer.h
@@ -41,8 +41,15 @@ public:
/*virtual*/ ~AudioMixer(); // non-virtual saves a v-table, restore if sub-classed
+
+ // This mixer has a hard-coded upper limit of 32 active track inputs.
+ // Adding support for > 32 tracks would require more than simply changing this value.
static const uint32_t MAX_NUM_TRACKS = 32;
// maximum number of channels supported by the mixer
+
+ // This mixer has a hard-coded upper limit of 2 channels for output.
+ // There is support for > 2 channel tracks down-mixed to 2 channel output via a down-mix effect.
+ // Adding support for > 2 channel output would require more than simply changing this value.
static const uint32_t MAX_NUM_CHANNELS = 2;
// maximum number of channels supported for the content
static const uint32_t MAX_NUM_CHANNELS_TO_DOWNMIX = 8;