AudioFlinger: Remove unnecessary computation
Test: Build and basic record sanity
Bug: 112142872
Change-Id: Ibfc0c715930593c23e58acd4afda6986d69d53b2
diff --git a/services/audioflinger/Threads.cpp b/services/audioflinger/Threads.cpp
index 79147af..3ef8ce2 100644
--- a/services/audioflinger/Threads.cpp
+++ b/services/audioflinger/Threads.cpp
@@ -6733,8 +6733,7 @@
// If an NBAIO source is present, use it to read the normal capture's data
if (mPipeSource != 0) {
- size_t framesToRead = mBufferSize / mFrameSize;
- framesToRead = min(mRsmpInFramesOA - rear, mRsmpInFramesP2 / 2);
+ size_t framesToRead = min(mRsmpInFramesOA - rear, mRsmpInFramesP2 / 2);
// The audio fifo read() returns OVERRUN on overflow, and advances the read pointer
// to the full buffer point (clearing the overflow condition). Upon OVERRUN error,