summaryrefslogtreecommitdiffstats
path: root/services/audioflinger/Threads.cpp
diff options
context:
space:
mode:
authorGlenn Kasten <gkasten@google.com>2013-08-13 09:14:51 -0700
committerGlenn Kasten <gkasten@google.com>2013-08-13 09:55:59 -0700
commit6e2ebe97f2ad0a21907f20f9ee644c4eacbb7a40 (patch)
treeea9d525f25620253ea86f434452bc37fbad73f76 /services/audioflinger/Threads.cpp
parente198c360d5e75a9b2097844c495c10902e7e8500 (diff)
downloadframeworks_av-6e2ebe97f2ad0a21907f20f9ee644c4eacbb7a40.zip
frameworks_av-6e2ebe97f2ad0a21907f20f9ee644c4eacbb7a40.tar.gz
frameworks_av-6e2ebe97f2ad0a21907f20f9ee644c4eacbb7a40.tar.bz2
Use curly braces in 'if' to make it easier to add logs
Change-Id: I58b33fefdd8bf703647414157a99a3223be3531c
Diffstat (limited to 'services/audioflinger/Threads.cpp')
-rw-r--r--services/audioflinger/Threads.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/services/audioflinger/Threads.cpp b/services/audioflinger/Threads.cpp
index 580db70..862258f 100644
--- a/services/audioflinger/Threads.cpp
+++ b/services/audioflinger/Threads.cpp
@@ -4281,8 +4281,9 @@ bool AudioFlinger::RecordThread::threadLoop()
int8_t *src = (int8_t *)mRsmpInBuffer + mRsmpInIndex * mFrameSize;
int8_t *dst = buffer.i8 + (buffer.frameCount - framesOut) *
mActiveTrack->mFrameSize;
- if (framesIn > framesOut)
+ if (framesIn > framesOut) {
framesIn = framesOut;
+ }
mRsmpInIndex += framesIn;
framesOut -= framesIn;
if (mChannelCount == mReqChannelCount) {
@@ -4989,8 +4990,7 @@ void AudioFlinger::RecordThread::readInputParameters()
mFrameCount = mBufferSize / mFrameSize;
mRsmpInBuffer = new int16_t[mFrameCount * mChannelCount];
- if (mSampleRate != mReqSampleRate && mChannelCount <= FCC_2 && mReqChannelCount <= FCC_2)
- {
+ if (mSampleRate != mReqSampleRate && mChannelCount <= FCC_2 && mReqChannelCount <= FCC_2) {
int channelCount;
// optimization: if mono to mono, use the resampler in stereo to stereo mode to avoid
// stereo to mono post process as the resampler always outputs stereo.