diff options
author | Glenn Kasten <gkasten@google.com> | 2013-08-05 22:59:42 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2013-08-05 22:59:43 +0000 |
commit | 3aa03e40668dd90390d9f1702f8c576e15b366c3 (patch) | |
tree | 01037957009952351730da4b588c3e2bcc42cda9 /media | |
parent | 77baebfe89c99415a0ee4c2ea87bfd8a0f9e51f1 (diff) | |
parent | eeca32671896739e84050da5992d5f151a1629de (diff) | |
download | frameworks_av-3aa03e40668dd90390d9f1702f8c576e15b366c3.zip frameworks_av-3aa03e40668dd90390d9f1702f8c576e15b366c3.tar.gz frameworks_av-3aa03e40668dd90390d9f1702f8c576e15b366c3.tar.bz2 |
Merge "IAudioFlinger::openRecord track_flags_t flags is in/out"
Diffstat (limited to 'media')
-rw-r--r-- | media/libmedia/AudioRecord.cpp | 3 | ||||
-rw-r--r-- | media/libmedia/IAudioFlinger.cpp | 12 |
2 files changed, 11 insertions, 4 deletions
diff --git a/media/libmedia/AudioRecord.cpp b/media/libmedia/AudioRecord.cpp index f039ec2..96930cc 100644 --- a/media/libmedia/AudioRecord.cpp +++ b/media/libmedia/AudioRecord.cpp @@ -448,12 +448,13 @@ status_t AudioRecord::openRecord_l( pid_t tid = -1; // FIXME see similar logic at AudioTrack for tid + IAudioFlinger::track_flags_t trackFlags = IAudioFlinger::TRACK_DEFAULT; int originalSessionId = mSessionId; sp<IAudioRecord> record = audioFlinger->openRecord(input, sampleRate, format, mChannelMask, frameCount, - IAudioFlinger::TRACK_DEFAULT, + &trackFlags, tid, &mSessionId, &status); diff --git a/media/libmedia/IAudioFlinger.cpp b/media/libmedia/IAudioFlinger.cpp index c6e43e7..be818c6 100644 --- a/media/libmedia/IAudioFlinger.cpp +++ b/media/libmedia/IAudioFlinger.cpp @@ -144,7 +144,7 @@ public: audio_format_t format, audio_channel_mask_t channelMask, size_t frameCount, - track_flags_t flags, + track_flags_t *flags, pid_t tid, int *sessionId, status_t *status) @@ -157,7 +157,8 @@ public: data.writeInt32(format); data.writeInt32(channelMask); data.writeInt32(frameCount); - data.writeInt32(flags); + track_flags_t lFlags = flags != NULL ? *flags : (track_flags_t) TRACK_DEFAULT; + data.writeInt32(lFlags); data.writeInt32((int32_t) tid); int lSessionId = 0; if (sessionId != NULL) { @@ -168,6 +169,10 @@ public: if (lStatus != NO_ERROR) { ALOGE("openRecord error: %s", strerror(-lStatus)); } else { + lFlags = reply.readInt32(); + if (flags != NULL) { + *flags = lFlags; + } lSessionId = reply.readInt32(); if (sessionId != NULL) { *sessionId = lSessionId; @@ -761,7 +766,8 @@ status_t BnAudioFlinger::onTransact( int sessionId = data.readInt32(); status_t status; sp<IAudioRecord> record = openRecord(input, - sampleRate, format, channelMask, frameCount, flags, tid, &sessionId, &status); + sampleRate, format, channelMask, frameCount, &flags, tid, &sessionId, &status); + reply->writeInt32(flags); reply->writeInt32(sessionId); reply->writeInt32(status); reply->writeStrongBinder(record->asBinder()); |