diff options
author | Glenn Kasten <gkasten@google.com> | 2014-03-06 19:17:01 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2014-03-06 19:17:02 +0000 |
commit | 55fbfbbbf00722dac3f789be69138445b771a1e1 (patch) | |
tree | 8b93cb3b1acbfdf93e6b17290248a47c72a5932b /services/audioflinger/Threads.cpp | |
parent | 950de3100455b389fc53cc2030571162b9872424 (diff) | |
parent | e842614837e5401adf77e90485300c288b9a7876 (diff) | |
download | frameworks_av-55fbfbbbf00722dac3f789be69138445b771a1e1.zip frameworks_av-55fbfbbbf00722dac3f789be69138445b771a1e1.tar.gz frameworks_av-55fbfbbbf00722dac3f789be69138445b771a1e1.tar.bz2 |
Merge "Use larger capture pipe since we support resampling by 6:1"
Diffstat (limited to 'services/audioflinger/Threads.cpp')
-rw-r--r-- | services/audioflinger/Threads.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/services/audioflinger/Threads.cpp b/services/audioflinger/Threads.cpp index 357ea22..690d0d6 100644 --- a/services/audioflinger/Threads.cpp +++ b/services/audioflinger/Threads.cpp @@ -5555,12 +5555,12 @@ void AudioFlinger::RecordThread::readInputParameters_l() mBufferSize = mInput->stream->common.get_buffer_size(&mInput->stream->common); mFrameCount = mBufferSize / mFrameSize; // This is the formula for calculating the temporary buffer size. - // With 3 HAL buffers, we can guarantee ability to down-sample the input by ratio of 2:1 to + // With 7 HAL buffers, we can guarantee ability to down-sample the input by ratio of 6:1 to // 1 full output buffer, regardless of the alignment of the available input. - // The "3" is somewhat arbitrary, and could probably be larger. + // The value is somewhat arbitrary, and could probably be even larger. // A larger value should allow more old data to be read after a track calls start(), // without increasing latency. - mRsmpInFrames = mFrameCount * 3; + mRsmpInFrames = mFrameCount * 7; mRsmpInFramesP2 = roundup(mRsmpInFrames); delete[] mRsmpInBuffer; // Over-allocate beyond mRsmpInFramesP2 to permit a HAL read past end of buffer |