summaryrefslogtreecommitdiffstats
path: root/media/libmedia/AudioRecord.cpp
diff options
context:
space:
mode:
authorGlenn Kasten <gkasten@google.com>2014-02-25 19:54:58 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-02-25 19:54:58 +0000
commit882469cfe767188a4c67d2d83f3d72ab553a4818 (patch)
tree61c3778cad5d38743e4cb9c53e07eb646f74b02b /media/libmedia/AudioRecord.cpp
parenta63805cd676b7004f1851df6e43183f2a22c40a8 (diff)
parent11cb175005db0090345f44bfa049b52fd8c809b8 (diff)
downloadframeworks_av-882469cfe767188a4c67d2d83f3d72ab553a4818.zip
frameworks_av-882469cfe767188a4c67d2d83f3d72ab553a4818.tar.gz
frameworks_av-882469cfe767188a4c67d2d83f3d72ab553a4818.tar.bz2
Merge "Update mReqFrameCount at same point in AudioTrack and AudioRecord"
Diffstat (limited to 'media/libmedia/AudioRecord.cpp')
-rw-r--r--media/libmedia/AudioRecord.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/media/libmedia/AudioRecord.cpp b/media/libmedia/AudioRecord.cpp
index ce35c31..9c04f17 100644
--- a/media/libmedia/AudioRecord.cpp
+++ b/media/libmedia/AudioRecord.cpp
@@ -516,11 +516,6 @@ status_t AudioRecord::openRecord_l(size_t epoch)
ALOGW("Requested frameCount %u but received frameCount %u", frameCount, temp);
}
frameCount = temp;
- // If IAudioRecord is re-created, don't let the requested frameCount
- // decrease. This can confuse clients that cache frameCount().
- if (frameCount > mReqFrameCount) {
- mReqFrameCount = frameCount;
- }
// FIXME missing fast track frameCount logic
mAwaitBoost = false;
@@ -546,6 +541,11 @@ status_t AudioRecord::openRecord_l(size_t epoch)
void *buffers = (char*)cblk + sizeof(audio_track_cblk_t);
mFrameCount = frameCount;
+ // If IAudioRecord is re-created, don't let the requested frameCount
+ // decrease. This can confuse clients that cache frameCount().
+ if (frameCount > mReqFrameCount) {
+ mReqFrameCount = frameCount;
+ }
// update proxy
mProxy = new AudioRecordClientProxy(cblk, buffers, mFrameCount, mFrameSize);