From 196e491c46422bf3ff8acad40ba617db6c3f69d1 Mon Sep 17 00:00:00 2001 From: "tina.legrand@webrtc.org" Date: Fri, 23 Mar 2012 14:39:46 +0000 Subject: [PATCH] Adding init decode slave to celt Minor rearanging of calls. Added a init function to the slave channel of CELT. Review URL: https://webrtc-codereview.appspot.com/458005 git-svn-id: http://webrtc.googlecode.com/svn/trunk@1931 4adac7df-926f-26a2-2b94-8c16560cd09d --- src/modules/audio_coding/main/source/acm_celt.cc | 7 ++++++- .../neteq/interface/webrtc_neteq_help_macros.h | 6 +++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/modules/audio_coding/main/source/acm_celt.cc b/src/modules/audio_coding/main/source/acm_celt.cc index c6a9efa0bb..a1462ecd63 100644 --- a/src/modules/audio_coding/main/source/acm_celt.cc +++ b/src/modules/audio_coding/main/source/acm_celt.cc @@ -199,12 +199,17 @@ int16_t ACMCELT::InternalInitDecoder(WebRtcACMCodecParams* codecParams) { } } - // Initiate decoder. + // Initiate decoder, both master and slave parts. if (WebRtcCelt_DecoderInit(dec_inst_ptr_) < 0) { WEBRTC_TRACE(webrtc::kTraceError, webrtc::kTraceAudioCoding, _uniqueID, "InternalInitDecoder: init decoder failed for Celt."); return -1; } + if (WebRtcCelt_DecoderInitSlave(dec_inst_ptr_) < 0) { + WEBRTC_TRACE(webrtc::kTraceError, webrtc::kTraceAudioCoding, _uniqueID, + "InternalInitDecoder: init decoder failed for Celt."); + return -1; + } return 0; } diff --git a/src/modules/audio_coding/neteq/interface/webrtc_neteq_help_macros.h b/src/modules/audio_coding/neteq/interface/webrtc_neteq_help_macros.h index 214bd10d44..c6f19bb546 100644 --- a/src/modules/audio_coding/neteq/interface/webrtc_neteq_help_macros.h +++ b/src/modules/audio_coding/neteq/interface/webrtc_neteq_help_macros.h @@ -331,7 +331,7 @@ #define SET_CELT_FUNCTIONS(inst) \ inst.funcDecode=(WebRtcNetEQ_FuncDecode)WebRtcCelt_Decode; \ inst.funcDecodeRCU=NULL; \ - inst.funcDecodePLC=(WebRtcNetEQ_FuncDecodePLC)WebRtcCelt_DecodePlc; \ + inst.funcDecodePLC=NULL; \ inst.funcDecodeInit=(WebRtcNetEQ_FuncDecodeInit)WebRtcCelt_DecoderInit; \ inst.funcAddLatePkt=NULL; \ inst.funcGetMDinfo=NULL; \ @@ -342,8 +342,8 @@ #define SET_CELTSLAVE_FUNCTIONS(inst) \ inst.funcDecode=(WebRtcNetEQ_FuncDecode)WebRtcCelt_DecodeSlave; \ inst.funcDecodeRCU=NULL; \ - inst.funcDecodePLC=(WebRtcNetEQ_FuncDecodePLC)WebRtcCelt_DecodePlc; \ - inst.funcDecodeInit=(WebRtcNetEQ_FuncDecodeInit)WebRtcCelt_DecoderInit; \ + inst.funcDecodePLC=NULL; \ + inst.funcDecodeInit=(WebRtcNetEQ_FuncDecodeInit)WebRtcCelt_DecoderInitSlave; \ inst.funcAddLatePkt=NULL; \ inst.funcGetMDinfo=NULL; \ inst.funcGetPitch=NULL; \