Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a4daf0b4 authored by Glenn Kasten's avatar Glenn Kasten
Browse files

Fix build warnings

Change-Id: Ife5e40264f43fb3ccb40830228701003fe106bf5
parent 5fedaffd
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;
+4 −4
Original line number Diff line number Diff line
@@ -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);
+1 −1
Original line number Diff line number Diff line
@@ -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,
+1 −1
Original line number Diff line number Diff line
@@ -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 */
        }
    }
+1 −1
Original line number Diff line number Diff line
@@ -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