From f551e9961a6f66d63bb57f288c4be01b00725289 Mon Sep 17 00:00:00 2001 From: Glenn Kasten Date: Mon, 19 Aug 2013 18:45:42 -0700 Subject: Channel counts are uint32_t Change-Id: I5676b6a291b72d7db6326f7eaf6d17588de51b05 --- services/audioflinger/AudioMixer.cpp | 2 +- services/audioflinger/Threads.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'services') diff --git a/services/audioflinger/AudioMixer.cpp b/services/audioflinger/AudioMixer.cpp index 91aedbb..8bd04c6 100644 --- a/services/audioflinger/AudioMixer.cpp +++ b/services/audioflinger/AudioMixer.cpp @@ -566,7 +566,7 @@ bool AudioMixer::track_t::setResampler(uint32_t value, uint32_t devSampleRate) resampler = AudioResampler::create( format, // the resampler sees the number of channels after the downmixer, if any - downmixerBufferProvider != NULL ? MAX_NUM_CHANNELS : channelCount, + (int) (downmixerBufferProvider != NULL ? MAX_NUM_CHANNELS : channelCount), devSampleRate, quality); resampler->setLocalTimeFreq(sLocalTimeFreq); } diff --git a/services/audioflinger/Threads.cpp b/services/audioflinger/Threads.cpp index ef90952..c14d4b4 100644 --- a/services/audioflinger/Threads.cpp +++ b/services/audioflinger/Threads.cpp @@ -5249,7 +5249,7 @@ void AudioFlinger::RecordThread::readInputParameters() mRsmpInBuffer = new int16_t[mFrameCount * mChannelCount]; if (mSampleRate != mReqSampleRate && mChannelCount <= FCC_2 && mReqChannelCount <= FCC_2) { - int channelCount; + uint32_t 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. if (mChannelCount == 1 && mReqChannelCount == 2) { @@ -5257,7 +5257,7 @@ void AudioFlinger::RecordThread::readInputParameters() } else { channelCount = 2; } - mResampler = AudioResampler::create(16, channelCount, mReqSampleRate); + mResampler = AudioResampler::create(16, (int) channelCount, mReqSampleRate); mResampler->setSampleRate(mSampleRate); mResampler->setVolume(AudioMixer::UNITY_GAIN, AudioMixer::UNITY_GAIN); mRsmpOutBuffer = new int32_t[mFrameCount * FCC_2]; -- cgit v1.1