summaryrefslogtreecommitdiffstats
path: root/media/libmedia/AudioRecord.cpp
diff options
context:
space:
mode:
authorGlenn Kasten <gkasten@google.com>2014-02-24 15:16:59 -0800
committerGlenn Kasten <gkasten@google.com>2014-02-24 17:21:35 -0800
commit11cb175005db0090345f44bfa049b52fd8c809b8 (patch)
tree9798441ae7d492cd41ca2ef5b84feb70f8703e97 /media/libmedia/AudioRecord.cpp
parentc85df82b1e8b05714268926a8bb3deb9c65f9a22 (diff)
downloadframeworks_av-11cb175005db0090345f44bfa049b52fd8c809b8.zip
frameworks_av-11cb175005db0090345f44bfa049b52fd8c809b8.tar.gz
frameworks_av-11cb175005db0090345f44bfa049b52fd8c809b8.tar.bz2
Update mReqFrameCount at same point in AudioTrack and AudioRecord
Change-Id: I12369dfbb9e75389f2cab015a706decdaf310a0d
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 e18819c..bb0d196 100644
--- a/media/libmedia/AudioRecord.cpp
+++ b/media/libmedia/AudioRecord.cpp
@@ -523,11 +523,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;
@@ -553,6 +548,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);