summaryrefslogtreecommitdiffstats
path: root/services/audioflinger/AudioMixer.cpp
diff options
context:
space:
mode:
authorGlenn Kasten <gkasten@google.com>2013-08-13 09:48:14 -0700
committerGlenn Kasten <gkasten@google.com>2013-08-13 09:56:00 -0700
commit34fca34606b448e6b71c2942f63cb13a0aebd620 (patch)
tree45c5942f63ba22888ed24b5801400cde07b3fae2 /services/audioflinger/AudioMixer.cpp
parent3255095af6677caeeebf81c8891ce8db745617ff (diff)
downloadframeworks_av-34fca34606b448e6b71c2942f63cb13a0aebd620.zip
frameworks_av-34fca34606b448e6b71c2942f63cb13a0aebd620.tar.gz
frameworks_av-34fca34606b448e6b71c2942f63cb13a0aebd620.tar.bz2
Explicit comparison to 0 for integral types
Change-Id: I2bfe864d1bda719581e297a38d96abfc0e3748b9
Diffstat (limited to 'services/audioflinger/AudioMixer.cpp')
-rw-r--r--services/audioflinger/AudioMixer.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/services/audioflinger/AudioMixer.cpp b/services/audioflinger/AudioMixer.cpp
index 84c7968..91aedbb 100644
--- a/services/audioflinger/AudioMixer.cpp
+++ b/services/audioflinger/AudioMixer.cpp
@@ -229,7 +229,7 @@ int AudioMixer::getTrackName(audio_channel_mask_t channelMask, int sessionId)
void AudioMixer::invalidateState(uint32_t mask)
{
- if (mask) {
+ if (mask != 0) {
mState.needsChanged |= mask;
mState.hook = process__validate;
}
@@ -709,7 +709,7 @@ void AudioMixer::process__validate(state_t* state, int64_t pts)
// select the processing hooks
state->hook = process__nop;
- if (countActiveTracks) {
+ if (countActiveTracks > 0) {
if (resampling) {
if (!state->outputTemp) {
state->outputTemp = new int32_t[MAX_NUM_CHANNELS * state->frameCount];
@@ -745,7 +745,7 @@ void AudioMixer::process__validate(state_t* state, int64_t pts)
// Now that the volume ramp has been done, set optimal state and
// track hooks for subsequent mixer process
- if (countActiveTracks) {
+ if (countActiveTracks > 0) {
bool allMuted = true;
uint32_t en = state->enabledTracks;
while (en) {
@@ -1162,7 +1162,7 @@ void AudioMixer::process__genericNoResampling(state_t* state, int64_t pts)
}
while (outFrames) {
size_t inFrames = (t.frameCount > outFrames)?outFrames:t.frameCount;
- if (inFrames) {
+ if (inFrames > 0) {
t.hook(&t, outTemp + (BLOCKSIZE-outFrames)*MAX_NUM_CHANNELS, inFrames,
state->resampleTemp, aux);
t.frameCount -= inFrames;