summaryrefslogtreecommitdiffstats
path: root/services/audioflinger/AudioMixer.cpp
diff options
context:
space:
mode:
authorGlenn Kasten <gkasten@google.com>2011-12-13 11:53:26 -0800
committerGlenn Kasten <gkasten@google.com>2011-12-15 09:18:17 -0800
commite0feee3da22beeffbd9357540e265f13b2119cbb (patch)
tree6b4d02fc40687bbc8b463acd659e147d084f0883 /services/audioflinger/AudioMixer.cpp
parenteebeceec684a36222b4559e3157b0db04c0a67ed (diff)
downloadframeworks_av-e0feee3da22beeffbd9357540e265f13b2119cbb.zip
frameworks_av-e0feee3da22beeffbd9357540e265f13b2119cbb.tar.gz
frameworks_av-e0feee3da22beeffbd9357540e265f13b2119cbb.tar.bz2
Use NULL not 0 for pointers
Change-Id: Iab3f9abbdab617dc5a599e657ec46a0b0a002eef
Diffstat (limited to 'services/audioflinger/AudioMixer.cpp')
-rw-r--r--services/audioflinger/AudioMixer.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/services/audioflinger/AudioMixer.cpp b/services/audioflinger/AudioMixer.cpp
index 7c7fa56..1167115 100644
--- a/services/audioflinger/AudioMixer.cpp
+++ b/services/audioflinger/AudioMixer.cpp
@@ -50,8 +50,8 @@ AudioMixer::AudioMixer(size_t frameCount, uint32_t sampleRate)
mState.enabledTracks= 0;
mState.needsChanged = 0;
mState.frameCount = frameCount;
- mState.outputTemp = 0;
- mState.resampleTemp = 0;
+ mState.outputTemp = NULL;
+ mState.resampleTemp = NULL;
mState.hook = process__nop;
track_t* t = mState.tracks;
for (int i=0 ; i<32 ; i++) {
@@ -67,11 +67,11 @@ AudioMixer::AudioMixer(size_t frameCount, uint32_t sampleRate)
t->format = 16;
t->channelMask = AUDIO_CHANNEL_OUT_STEREO;
t->buffer.raw = 0;
- t->bufferProvider = 0;
- t->hook = 0;
- t->resampler = 0;
+ t->bufferProvider = NULL;
+ t->hook = NULL;
+ t->resampler = NULL;
t->sampleRate = mSampleRate;
- t->in = 0;
+ t->in = NULL;
t->mainBuffer = NULL;
t->auxBuffer = NULL;
t++;
@@ -127,7 +127,7 @@ AudioMixer::AudioMixer(size_t frameCount, uint32_t sampleRate)
if (track.resampler) {
// delete the resampler
delete track.resampler;
- track.resampler = 0;
+ track.resampler = NULL;
track.sampleRate = mSampleRate;
invalidateState(1<<name);
}
@@ -290,7 +290,7 @@ bool AudioMixer::track_t::setResampler(uint32_t value, uint32_t devSampleRate)
if (value!=devSampleRate || resampler) {
if (sampleRate != value) {
sampleRate = value;
- if (resampler == 0) {
+ if (resampler == NULL) {
resampler = AudioResampler::create(
format, channelCount, devSampleRate);
}
@@ -302,12 +302,12 @@ bool AudioMixer::track_t::setResampler(uint32_t value, uint32_t devSampleRate)
bool AudioMixer::track_t::doesResample() const
{
- return resampler != 0;
+ return resampler != NULL;
}
void AudioMixer::track_t::resetResampler()
{
- if (resampler != 0) {
+ if (resampler != NULL) {
resampler->reset();
}
}
@@ -430,11 +430,11 @@ void AudioMixer::process__validate(state_t* state)
} else {
if (state->outputTemp) {
delete [] state->outputTemp;
- state->outputTemp = 0;
+ state->outputTemp = NULL;
}
if (state->resampleTemp) {
delete [] state->resampleTemp;
- state->resampleTemp = 0;
+ state->resampleTemp = NULL;
}
state->hook = process__genericNoResampling;
if (all16BitsStereoNoResample && !volumeRamp) {