From a011e35b22f95f558d81dc9c94b68b1465c4661d Mon Sep 17 00:00:00 2001 From: Eric Laurent Date: Thu, 29 Mar 2012 15:51:43 -0700 Subject: implemented synchronous audio capture Added the infrastructure to support the synchronization of playback and capture actions on specific events. The first requirement for this feature is to synchronize the audio capture start with the full rendering of a given audio content. The applications can further be extended to other use cases (synchronized playback start...) by adding new synchronization events and new synchronous control methods on player or recorders. Also added a method to query the audio session from a ToneGenerator. Change-Id: I51f1167290d9cafdf2fbcdf9e4785156973af44c --- include/media/AudioRecord.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'include/media/AudioRecord.h') diff --git a/include/media/AudioRecord.h b/include/media/AudioRecord.h index 5bfb65b..80d2d72 100644 --- a/include/media/AudioRecord.h +++ b/include/media/AudioRecord.h @@ -30,6 +30,7 @@ #include #include +#include namespace android { @@ -215,8 +216,11 @@ public: /* After it's created the track is not active. Call start() to * make it active. If set, the callback will start being called. + * if event is not AudioSystem::SYNC_EVENT_NONE, the capture start will be delayed until + * the specified event occurs on the specified trigger session. */ - status_t start(); + status_t start(AudioSystem::sync_event_t event = AudioSystem::SYNC_EVENT_NONE, + int triggerSession = 0); /* Stop a track. If set, the callback will cease being called and * obtainBuffer returns STOPPED. Note that obtainBuffer() still works -- cgit v1.1