Make an AudioEncoder subclass for iLBC

BUG=3926
R=henrik.lundin@webrtc.org, kjellander@google.com
TBR=kjellander@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/32649005

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7828 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
kwiberg@webrtc.org
2014-12-08 17:11:44 +00:00
parent ee43263a50
commit cb858ba397
10 changed files with 171 additions and 29 deletions

View File

@ -86,8 +86,10 @@ int16_t WebRtcIlbcfix_EncoderInit(iLBC_encinst_t *iLBCenc_inst, int16_t mode)
}
}
int16_t WebRtcIlbcfix_Encode(iLBC_encinst_t *iLBCenc_inst, const int16_t *speechIn, int16_t len, int16_t *encoded) {
int16_t WebRtcIlbcfix_Encode(iLBC_encinst_t* iLBCenc_inst,
const int16_t* speechIn,
int16_t len,
uint8_t* encoded) {
int16_t pos = 0;
int16_t encpos = 0;
@ -104,7 +106,8 @@ int16_t WebRtcIlbcfix_Encode(iLBC_encinst_t *iLBCenc_inst, const int16_t *speech
/* call encoder */
while (pos<len) {
WebRtcIlbcfix_EncodeImpl((uint16_t*) &encoded[encpos], &speechIn[pos], (iLBC_Enc_Inst_t*) iLBCenc_inst);
WebRtcIlbcfix_EncodeImpl((uint16_t*)&encoded[2 * encpos], &speechIn[pos],
(iLBC_Enc_Inst_t*)iLBCenc_inst);
#ifdef SPLIT_10MS
pos += 80;
if(((iLBC_Enc_Inst_t*)iLBCenc_inst)->section == 0)