Loading services/audioflinger/AudioMixerOps.h +1 −1 Original line number Diff line number Diff line Loading @@ -184,7 +184,7 @@ inline int16_t MixMul<int16_t, float, float>(float value, float volume) { template <typename TO, typename TI> inline void MixAccum(TO *auxaccum, TI value) { if (!is_same<TO, TI>::value) { LOG_ALWAYS_FATAL("MixAccum type not properly specialized: %d %d\n", LOG_ALWAYS_FATAL("MixAccum type not properly specialized: %zu %zu\n", sizeof(TO), sizeof(TI)); } *auxaccum += value; Loading services/audioflinger/AudioResamplerDyn.cpp +4 −4 Original line number Diff line number Diff line Loading @@ -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)); Loading Loading @@ -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); Loading services/audioflinger/AudioResamplerFirProcess.h +1 −1 Original line number Diff line number Diff line Loading @@ -177,7 +177,7 @@ struct InterpNull { template <int CHANNELS, int STRIDE, typename TFUNC, typename TC, typename TI, typename TO, typename TINTERP> static inline void ProcessBase(TO* const out, int count, size_t count, const TC* coefsP, const TC* coefsN, const TI* sP, Loading services/audioflinger/tests/resampler_tests.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -60,7 +60,7 @@ void buffercmp(const void *reference, const void *test, int check = memcmp((const char*)reference + i * outputFrameSize, (const char*)test + i * outputFrameSize, outputFrameSize); if (check) { ALOGE("Failure at frame %d", i); ALOGE("Failure at frame %zu", i); ASSERT_EQ(check, 0); /* fails */ } } Loading services/audioflinger/tests/test-mixer.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -62,7 +62,7 @@ static int writeFile(const char *filename, const void *buffer, info.samplerate = sampleRate; info.channels = channels; info.format = SF_FORMAT_WAV | (isBufferFloat ? SF_FORMAT_FLOAT : SF_FORMAT_PCM_16); printf("saving file:%s channels:%d samplerate:%d frames:%d\n", printf("saving file:%s channels:%u samplerate:%u frames:%zu\n", filename, info.channels, info.samplerate, frames); SNDFILE *sf = sf_open(filename, SFM_WRITE, &info); if (sf == NULL) { Loading Loading
services/audioflinger/AudioMixerOps.h +1 −1 Original line number Diff line number Diff line Loading @@ -184,7 +184,7 @@ inline int16_t MixMul<int16_t, float, float>(float value, float volume) { template <typename TO, typename TI> inline void MixAccum(TO *auxaccum, TI value) { if (!is_same<TO, TI>::value) { LOG_ALWAYS_FATAL("MixAccum type not properly specialized: %d %d\n", LOG_ALWAYS_FATAL("MixAccum type not properly specialized: %zu %zu\n", sizeof(TO), sizeof(TI)); } *auxaccum += value; Loading
services/audioflinger/AudioResamplerDyn.cpp +4 −4 Original line number Diff line number Diff line Loading @@ -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)); Loading Loading @@ -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); Loading
services/audioflinger/AudioResamplerFirProcess.h +1 −1 Original line number Diff line number Diff line Loading @@ -177,7 +177,7 @@ struct InterpNull { template <int CHANNELS, int STRIDE, typename TFUNC, typename TC, typename TI, typename TO, typename TINTERP> static inline void ProcessBase(TO* const out, int count, size_t count, const TC* coefsP, const TC* coefsN, const TI* sP, Loading
services/audioflinger/tests/resampler_tests.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -60,7 +60,7 @@ void buffercmp(const void *reference, const void *test, int check = memcmp((const char*)reference + i * outputFrameSize, (const char*)test + i * outputFrameSize, outputFrameSize); if (check) { ALOGE("Failure at frame %d", i); ALOGE("Failure at frame %zu", i); ASSERT_EQ(check, 0); /* fails */ } } Loading
services/audioflinger/tests/test-mixer.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -62,7 +62,7 @@ static int writeFile(const char *filename, const void *buffer, info.samplerate = sampleRate; info.channels = channels; info.format = SF_FORMAT_WAV | (isBufferFloat ? SF_FORMAT_FLOAT : SF_FORMAT_PCM_16); printf("saving file:%s channels:%d samplerate:%d frames:%d\n", printf("saving file:%s channels:%u samplerate:%u frames:%zu\n", filename, info.channels, info.samplerate, frames); SNDFILE *sf = sf_open(filename, SFM_WRITE, &info); if (sf == NULL) { Loading