summaryrefslogtreecommitdiffstats
path: root/services/audioflinger/AudioResamplerDyn.cpp
diff options
context:
space:
mode:
authorGlenn Kasten <gkasten@google.com>2014-07-28 16:34:45 -0700
committerGlenn Kasten <gkasten@google.com>2014-07-29 15:45:38 -0700
commita4daf0b4f934b800a49f199fb8c09409391c8fc0 (patch)
treef2b1f47f9c09d21d0eb22f1f78d10c766e7a1c11 /services/audioflinger/AudioResamplerDyn.cpp
parent5fedaffddebd6b37f09cdc9804812945b9622498 (diff)
downloadframeworks_av-a4daf0b4f934b800a49f199fb8c09409391c8fc0.zip
frameworks_av-a4daf0b4f934b800a49f199fb8c09409391c8fc0.tar.gz
frameworks_av-a4daf0b4f934b800a49f199fb8c09409391c8fc0.tar.bz2
Fix build warnings
Change-Id: Ife5e40264f43fb3ccb40830228701003fe106bf5
Diffstat (limited to 'services/audioflinger/AudioResamplerDyn.cpp')
-rw-r--r--services/audioflinger/AudioResamplerDyn.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/services/audioflinger/AudioResamplerDyn.cpp b/services/audioflinger/AudioResamplerDyn.cpp
index e201ff8..159ab70 100644
--- a/services/audioflinger/AudioResamplerDyn.cpp
+++ b/services/audioflinger/AudioResamplerDyn.cpp
@@ -82,17 +82,17 @@ template<typename TC, typename TI, typename TO>
void AudioResamplerDyn<TC, TI, TO>::InBuffer::resize(int CHANNELS, int halfNumCoefs)
{
// calculate desired state size
- int stateCount = halfNumCoefs * CHANNELS * 2 * kStateSizeMultipleOfFilterLength;
+ size_t stateCount = halfNumCoefs * CHANNELS * 2 * kStateSizeMultipleOfFilterLength;
// check if buffer needs resizing
if (mState
&& stateCount == mStateCount
- && mRingFull-mState == mStateCount-halfNumCoefs*CHANNELS) {
+ && mRingFull-mState == (ssize_t) (mStateCount-halfNumCoefs*CHANNELS)) {
return;
}
// create new buffer
- TI* state;
+ TI* state = NULL;
(void)posix_memalign(reinterpret_cast<void**>(&state), 32, stateCount*sizeof(*state));
memset(state, 0, stateCount*sizeof(*state));
@@ -213,7 +213,7 @@ template<typename TC, typename TI, typename TO>
void AudioResamplerDyn<TC, TI, TO>::createKaiserFir(Constants &c,
double stopBandAtten, int inSampleRate, int outSampleRate, double tbwCheat)
{
- TC* buf;
+ TC* buf = NULL;
static const double atten = 0.9998; // to avoid ripple overflow
double fcr;
double tbw = firKaiserTbw(c.mHalfNumCoefs, stopBandAtten);