diff options
author | Glenn Kasten <gkasten@google.com> | 2013-07-17 14:44:50 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2013-07-17 14:44:51 +0000 |
commit | cff1b2359b8a302f19539c0bc5d25c98a52733fd (patch) | |
tree | e0d7b7b64f4b3a9cf3eb7d2158de59efb4bd0b3a /services | |
parent | bb849b5d1a0364b69aa15ed00709edf4b7e348fc (diff) | |
parent | fb1fdc9d6603aa228362e7349451f6455c9849c2 (diff) | |
download | frameworks_av-cff1b2359b8a302f19539c0bc5d25c98a52733fd.zip frameworks_av-cff1b2359b8a302f19539c0bc5d25c98a52733fd.tar.gz frameworks_av-cff1b2359b8a302f19539c0bc5d25c98a52733fd.tar.bz2 |
Merge "Add comments"
Diffstat (limited to 'services')
-rw-r--r-- | services/audioflinger/StateQueue.h | 8 | ||||
-rw-r--r-- | services/audioflinger/Threads.h | 2 |
2 files changed, 9 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 diff --git a/services/audioflinger/Threads.h b/services/audioflinger/Threads.h index 7de6872..e15d98a 100644 --- a/services/audioflinger/Threads.h +++ b/services/audioflinger/Threads.h @@ -429,6 +429,8 @@ public: virtual status_t setSyncEvent(const sp<SyncEvent>& event); virtual bool isValidSyncEvent(const sp<SyncEvent>& event) const; + + // called with AudioFlinger lock held void invalidateTracks(audio_stream_type_t streamType); |