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
This commit is contained in:
tina.legrand@webrtc.org 2012-03-23 14:39:46 +00:00
parent c231e4cb03
commit 196e491c46
2 changed files with 9 additions and 4 deletions

View File

@ -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;
}

View File

@ -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; \