summaryrefslogtreecommitdiffstats
path: root/include/media/AudioSystem.h
diff options
context:
space:
mode:
authorEric Laurent <elaurent@google.com>2012-05-08 18:57:51 -0700
committerEric Laurent <elaurent@google.com>2012-05-14 17:20:12 -0700
commit2986460984580833161bdaabc7f17da1005a8961 (patch)
treebd8aa210c0faee61dc45e23479e29cfc85f313c2 /include/media/AudioSystem.h
parentdfa29ab13647f22b30b2de34d4830c9e815bf120 (diff)
downloadframeworks_av-2986460984580833161bdaabc7f17da1005a8961.zip
frameworks_av-2986460984580833161bdaabc7f17da1005a8961.tar.gz
frameworks_av-2986460984580833161bdaabc7f17da1005a8961.tar.bz2
Fix issues with synchronous record start.
- Added a timeout in case the trigger event is never fired. - Extend AudioRecord obtainBuffer() timeout in case of synchronous start to avoid spurious warning. - Make sure that the event is triggered if the track is destroyed. - Reject event if the triggering track is in an incompatible state. Also fix a problem when restoring a static AudioTrack after a mediaserver crash. Bug 6449468. Change-Id: Ib36e11111fb88f73caa31dcb0622792737d57a4b
Diffstat (limited to 'include/media/AudioSystem.h')
-rw-r--r--include/media/AudioSystem.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/media/AudioSystem.h b/include/media/AudioSystem.h
index f73a317..e2662f2 100644
--- a/include/media/AudioSystem.h
+++ b/include/media/AudioSystem.h
@@ -173,6 +173,10 @@ public:
SYNC_EVENT_CNT,
};
+ // Timeout for synchronous record start. Prevents from blocking the record thread forever
+ // if the trigger event is not fired.
+ static const uint32_t kSyncRecordStartTimeOutMs = 30000;
+
//
// IAudioPolicyService interface (see AudioPolicyInterface for method descriptions)
//