VAD refactor: int return value for Init.
For consistency and as part of style, the return value of WebRtcVad_Init() has been changed to int. Impact: 1) audio_processing, audio_coding, a test in CNG, functionTest in audio_conference_mixer, a test in net_eq all used int values. Hence, unaffected. 2) Function pointers in net_eq changed. 3) The VADInit in neteq/dsp.c boiled down to typecast into int anyhow, which now is removed. TEST=vad_unittests, neteq_unittests Review URL: https://webrtc-codereview.appspot.com/355003 git-svn-id: http://webrtc.googlecode.com/svn/trunk@1453 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
@@ -429,7 +429,7 @@ int WebRtcNetEQ_InitVAD(PostDecodeVAD_t *VADInst, WebRtc_UWord16 fs)
|
||||
&& VADInst->setmodeFunction != NULL /* ... pointers ... */
|
||||
&& VADInst->VADFunction != NULL) /* ... are defined */
|
||||
{
|
||||
res = (int) VADInst->initFunction( VADInst->VADState ); /* call VAD init function */
|
||||
res = VADInst->initFunction( VADInst->VADState ); /* call VAD init function */
|
||||
res |= WebRtcNetEQ_SetVADModeInternal( VADInst, VADInst->VADMode );
|
||||
|
||||
if (res!=0)
|
||||
|
||||
@@ -188,7 +188,7 @@ typedef struct ExpandInst_t_
|
||||
* These function pointers match the definitions of WebRtc VAD functions WebRtcVad_Init,
|
||||
* WebRtcVad_set_mode and WebRtcVad_Process, respectively, all found in webrtc_vad.h.
|
||||
*/
|
||||
typedef WebRtc_Word16 (*VADInitFunction)(void *VAD_inst);
|
||||
typedef int (*VADInitFunction)(void *VAD_inst);
|
||||
typedef WebRtc_Word16 (*VADSetmodeFunction)(void *VAD_inst, WebRtc_Word16 mode);
|
||||
typedef WebRtc_Word16 (*VADFunction)(void *VAD_inst, WebRtc_Word16 fs, WebRtc_Word16 *frame,
|
||||
WebRtc_Word16 frameLen);
|
||||
|
||||
@@ -138,7 +138,7 @@ int WebRtcNetEQ_GetRawFrameWaitingTimes(void *inst,
|
||||
* These function pointers match the definitions of webrtc VAD functions WebRtcVad_Init,
|
||||
* WebRtcVad_set_mode and WebRtcVad_Process, respectively, all found in webrtc_vad.h.
|
||||
*/
|
||||
typedef WebRtc_Word16 (*WebRtcNetEQ_VADInitFunction)(void *VAD_inst);
|
||||
typedef int (*WebRtcNetEQ_VADInitFunction)(void *VAD_inst);
|
||||
typedef WebRtc_Word16 (*WebRtcNetEQ_VADSetmodeFunction)(void *VAD_inst, WebRtc_Word16 mode);
|
||||
typedef WebRtc_Word16 (*WebRtcNetEQ_VADFunction)(void *VAD_inst, WebRtc_Word16 fs,
|
||||
WebRtc_Word16 *frame, WebRtc_Word16 frameLen);
|
||||
|
||||
Reference in New Issue
Block a user