Use curly braces in 'if' to make it easier to add logs
Change-Id: I58b33fefdd8bf703647414157a99a3223be3531c
diff --git a/services/audioflinger/AudioMixer.cpp b/services/audioflinger/AudioMixer.cpp
index df4e029..84c7968 100644
--- a/services/audioflinger/AudioMixer.cpp
+++ b/services/audioflinger/AudioMixer.cpp
@@ -752,8 +752,7 @@
const int i = 31 - __builtin_clz(en);
en &= ~(1<<i);
track_t& t = state->tracks[i];
- if (!t.doesResample() && t.volumeRL == 0)
- {
+ if (!t.doesResample() && t.volumeRL == 0) {
t.needs |= NEEDS_MUTE_ENABLED;
t.hook = track__nop;
} else {
@@ -1124,8 +1123,9 @@
t.in = t.buffer.raw;
// t.in == NULL can happen if the track was flushed just after having
// been enabled for mixing.
- if (t.in == NULL)
+ if (t.in == NULL) {
enabledTracks &= ~(1<<i);
+ }
}
e0 = enabledTracks;
@@ -1445,8 +1445,9 @@
int64_t AudioMixer::calculateOutputPTS(const track_t& t, int64_t basePTS,
int outputFrameIndex)
{
- if (AudioBufferProvider::kInvalidPTS == basePTS)
+ if (AudioBufferProvider::kInvalidPTS == basePTS) {
return AudioBufferProvider::kInvalidPTS;
+ }
return basePTS + ((outputFrameIndex * sLocalTimeFreq) / t.sampleRate);
}