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 --- media/libmedia/IAudioRecord.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'media/libmedia/IAudioRecord.cpp') diff --git a/media/libmedia/IAudioRecord.cpp b/media/libmedia/IAudioRecord.cpp index 377b9a8..cb5c7f3 100644 --- a/media/libmedia/IAudioRecord.cpp +++ b/media/libmedia/IAudioRecord.cpp @@ -42,11 +42,13 @@ public: { } - virtual status_t start(pid_t tid) + virtual status_t start(pid_t tid, int event, int triggerSession) { Parcel data, reply; data.writeInterfaceToken(IAudioRecord::getInterfaceDescriptor()); data.writeInt32(tid); + data.writeInt32(event); + data.writeInt32(triggerSession); status_t status = remote()->transact(START, data, &reply); if (status == NO_ERROR) { status = reply.readInt32(); @@ -91,7 +93,7 @@ status_t BnAudioRecord::onTransact( } break; case START: { CHECK_INTERFACE(IAudioRecord, data, reply); - reply->writeInt32(start(data.readInt32())); + reply->writeInt32(start(data.readInt32(), data.readInt32(), data.readInt32())); return NO_ERROR; } break; case STOP: { -- cgit v1.1