diff options
author | Glenn Kasten <gkasten@google.com> | 2013-08-13 09:14:51 -0700 |
---|---|---|
committer | Glenn Kasten <gkasten@google.com> | 2013-08-13 09:55:59 -0700 |
commit | 6e2ebe97f2ad0a21907f20f9ee644c4eacbb7a40 (patch) | |
tree | ea9d525f25620253ea86f434452bc37fbad73f76 /services/audioflinger/AudioResampler.cpp | |
parent | e198c360d5e75a9b2097844c495c10902e7e8500 (diff) | |
download | frameworks_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/AudioResampler.cpp')
-rw-r--r-- | services/audioflinger/AudioResampler.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/services/audioflinger/AudioResampler.cpp b/services/audioflinger/AudioResampler.cpp index 2c3c719..323f1a4 100644 --- a/services/audioflinger/AudioResampler.cpp +++ b/services/audioflinger/AudioResampler.cpp @@ -339,8 +339,9 @@ void AudioResamplerOrder1::resampleStereo16(int32_t* out, size_t outFrameCount, out[outputIndex++] += vl * Interp(mX0L, in[0], phaseFraction); out[outputIndex++] += vr * Interp(mX0R, in[1], phaseFraction); Advance(&inputIndex, &phaseFraction, phaseIncrement); - if (outputIndex == outputSampleCount) + if (outputIndex == outputSampleCount) { break; + } } // process input samples @@ -434,8 +435,9 @@ void AudioResamplerOrder1::resampleMono16(int32_t* out, size_t outFrameCount, out[outputIndex++] += vl * sample; out[outputIndex++] += vr * sample; Advance(&inputIndex, &phaseFraction, phaseIncrement); - if (outputIndex == outputSampleCount) + if (outputIndex == outputSampleCount) { break; + } } // process input samples |