summaryrefslogtreecommitdiffstats
path: root/services/audioflinger/StateQueue.h
diff options
context:
space:
mode:
authorGlenn Kasten <gkasten@google.com>2013-07-10 17:03:19 -0700
committerGlenn Kasten <gkasten@google.com>2013-07-10 17:08:15 -0700
commitfb1fdc9d6603aa228362e7349451f6455c9849c2 (patch)
tree1caac6c881db81bcfedb596b292ce62ecbaf6a2c /services/audioflinger/StateQueue.h
parent551ababe67ce31778000d52958e53e1c56e1a294 (diff)
downloadframeworks_av-fb1fdc9d6603aa228362e7349451f6455c9849c2.zip
frameworks_av-fb1fdc9d6603aa228362e7349451f6455c9849c2.tar.gz
frameworks_av-fb1fdc9d6603aa228362e7349451f6455c9849c2.tar.bz2
Add comments
Change-Id: Ifbf3a46a4183c8abc0feee1c588953ab10303cc1
Diffstat (limited to 'services/audioflinger/StateQueue.h')
-rw-r--r--services/audioflinger/StateQueue.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/services/audioflinger/StateQueue.h b/services/audioflinger/StateQueue.h
index e33b3c6..9cde642 100644
--- a/services/audioflinger/StateQueue.h
+++ b/services/audioflinger/StateQueue.h
@@ -31,8 +31,14 @@
// and this may result in an audible artifact
// needs read-only access to a recent stable state,
// but not necessarily the most current one
+// only allocate and free memory when configuration changes
+// avoid conventional logging, as this is a form of I/O and could block
+// defer computation to other threads when feasible; for example
+// cycle times are collected by fast mixer thread but the floating-point
+// statistical calculations on these cycle times are computed by normal mixer
+// these requirements also apply to callouts such as AudioBufferProvider and VolumeProvider
// Normal mixer thread:
-// periodic with typical period ~40 ms
+// periodic with typical period ~20 ms
// SCHED_OTHER scheduling policy and nice priority == urgent audio
// ok to block, but prefer to avoid as much as possible
// needs read/write access to state