diff --git a/src/modules/audio_coding/neteq/codec_db.c b/src/modules/audio_coding/neteq/codec_db.c index e91e37297e..5369cfd271 100644 --- a/src/modules/audio_coding/neteq/codec_db.c +++ b/src/modules/audio_coding/neteq/codec_db.c @@ -726,12 +726,18 @@ WebRtc_UWord16 WebRtcNetEQ_DbGetSampleRate(CodecDbInst_t *inst, int payloadType) { switch (i) { +#ifdef NETEQ_WIDEBAND case 1: return 16000; +#endif +#ifdef NETEQ_32KHZ_WIDEBAND case 2: return 32000; +#endif +#ifdef NETEQ_48KHZ_WIDEBAND case 3: return 48000; +#endif default: return 8000; } diff --git a/src/modules/audio_coding/neteq/dtmf_tonegen.c b/src/modules/audio_coding/neteq/dtmf_tonegen.c index a52f9bc635..c9ad232173 100644 --- a/src/modules/audio_coding/neteq/dtmf_tonegen.c +++ b/src/modules/audio_coding/neteq/dtmf_tonegen.c @@ -173,8 +173,8 @@ WebRtc_Word16 WebRtcNetEQ_DTMFGenerate(dtmf_tone_inst_t *DTMFdecInst, WebRtc_Wor WebRtc_Word16 a2 = 0; /* a-coefficient for second tone (high tone) */ int i; int frameLen; /* number of samples to generate */ - int lowIndex; - int highIndex; + int lowIndex = 0; /* Default to avoid compiler warnings. */ + int highIndex = 4; /* Default to avoid compiler warnings. */ WebRtc_Word32 tempVal; WebRtc_Word16 tempValLow; WebRtc_Word16 tempValHigh; @@ -309,10 +309,6 @@ WebRtc_Word16 WebRtcNetEQ_DTMFGenerate(dtmf_tone_inst_t *DTMFdecInst, WebRtc_Wor highIndex = 7;/* high frequency: 1633 Hz */ break; } - default: - { - return DTMF_DEC_PARAMETER_ERROR; - } } /* end switch */ /* select coefficients based on results from switches above */ diff --git a/src/modules/audio_coding/neteq/rtp.c b/src/modules/audio_coding/neteq/rtp.c index bd4f9a2260..63cdf652fc 100644 --- a/src/modules/audio_coding/neteq/rtp.c +++ b/src/modules/audio_coding/neteq/rtp.c @@ -138,7 +138,7 @@ int WebRtcNetEQ_RedundancySplit(RTPPacket_t* RTPheader[], int i_MaximumPayloads, else { /* Discard all but the two last payloads. */ - while (((pw16_data[2] & 0x8000) == 1)&& + while (((pw16_data[2] & 0x8000) != 0) && (pw16_data<((RTPheader[0]->payload)+((RTPheader[0]->payloadLen+1)>>1)))) { i_discardedBlockLength += (4+(((WebRtc_UWord16)pw16_data[1]) & 0x3FF)); @@ -167,7 +167,7 @@ int WebRtcNetEQ_RedundancySplit(RTPPacket_t* RTPheader[], int i_MaximumPayloads, else { /* Discard all but the two last payloads. */ - while (((pw16_data[2] & 0x80) == 1) && (pw16_data < ((RTPheader[0]->payload) + while (((pw16_data[2] & 0x80) != 0) && (pw16_data < ((RTPheader[0]->payload) + ((RTPheader[0]->payloadLen + 1) >> 1)))) { i_discardedBlockLength += (4 + ((((WebRtc_UWord16) pw16_data[1]) & 0x3) << 8) diff --git a/src/modules/audio_coding/neteq/webrtc_neteq.c b/src/modules/audio_coding/neteq/webrtc_neteq.c index 776f61f096..47355c041d 100644 --- a/src/modules/audio_coding/neteq/webrtc_neteq.c +++ b/src/modules/audio_coding/neteq/webrtc_neteq.c @@ -345,12 +345,7 @@ int WebRtcNetEQ_GetRecommendedBufferSize(void *inst, const enum WebRtcNetEQDecod } *MaxNoOfPackets = (*MaxNoOfPackets) * multiplier; *sizeinbytes = (*sizeinbytes) * multiplier; - if (ok != 0) - { - NetEqMainInst->ErrorCode = -ok; - return (-1); - } - return (ok); + return 0; } int WebRtcNetEQ_AssignBuffer(void *inst, int MaxNoOfPackets, void *NETEQ_Buffer_Addr,