VAD-refactor. Changed to int as return value for WebRtcVad_set_mode().
Impact on NetEq function pointers. Other components already treat the output as int. These are: * audio_processing * funtion test in audio_conference_mixer * audio_coding TEST=vad_unittests, neteq_unittests Review URL: https://webrtc-codereview.appspot.com/367003 git-svn-id: http://webrtc.googlecode.com/svn/trunk@1503 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
parent
3b57ee0238
commit
152c34cf11
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
|
||||
* Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by a BSD-style license
|
||||
* that can be found in the LICENSE file in the root of the source
|
||||
@ -127,7 +127,7 @@ int WebRtcVad_Init(VadInst *vad_inst);
|
||||
* Return value : 0 - Ok
|
||||
* -1 - Error
|
||||
*/
|
||||
WebRtc_Word16 WebRtcVad_set_mode(VadInst *vad_inst, WebRtc_Word16 mode);
|
||||
int WebRtcVad_set_mode(VadInst *vad_inst, WebRtc_Word16 mode);
|
||||
|
||||
/****************************************************************************
|
||||
* WebRtcVad_Process(...)
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
|
||||
* Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by a BSD-style license
|
||||
* that can be found in the LICENSE file in the root of the source
|
||||
@ -113,7 +113,7 @@ int WebRtcVad_Init(VadInst *vad_inst)
|
||||
return WebRtcVad_InitCore((VadInstT*)vad_inst, mode);
|
||||
}
|
||||
|
||||
WebRtc_Word16 WebRtcVad_set_mode(VadInst *vad_inst, WebRtc_Word16 mode)
|
||||
int WebRtcVad_set_mode(VadInst *vad_inst, WebRtc_Word16 mode)
|
||||
{
|
||||
VadInstT* vad_ptr;
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
|
||||
* Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by a BSD-style license
|
||||
* that can be found in the LICENSE file in the root of the source
|
||||
@ -482,7 +482,7 @@ int WebRtcNetEQ_SetVADModeInternal(PostDecodeVAD_t *VADInst,
|
||||
if (VADInst->VADState != NULL)
|
||||
{
|
||||
/* call setmode function */
|
||||
res = (int) VADInst->setmodeFunction(VADInst->VADState, mode);
|
||||
res = VADInst->setmodeFunction(VADInst->VADState, mode);
|
||||
}
|
||||
|
||||
return(res);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
|
||||
* Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by a BSD-style license
|
||||
* that can be found in the LICENSE file in the root of the source
|
||||
@ -189,7 +189,7 @@ typedef struct ExpandInst_t_
|
||||
* WebRtcVad_set_mode and WebRtcVad_Process, respectively, all found in webrtc_vad.h.
|
||||
*/
|
||||
typedef int (*VADInitFunction)(void *VAD_inst);
|
||||
typedef WebRtc_Word16 (*VADSetmodeFunction)(void *VAD_inst, WebRtc_Word16 mode);
|
||||
typedef int (*VADSetmodeFunction)(void *VAD_inst, WebRtc_Word16 mode);
|
||||
typedef WebRtc_Word16 (*VADFunction)(void *VAD_inst, WebRtc_Word16 fs, WebRtc_Word16 *frame,
|
||||
WebRtc_Word16 frameLen);
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
|
||||
* Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by a BSD-style license
|
||||
* that can be found in the LICENSE file in the root of the source
|
||||
@ -139,7 +139,7 @@ int WebRtcNetEQ_GetRawFrameWaitingTimes(void *inst,
|
||||
* WebRtcVad_set_mode and WebRtcVad_Process, respectively, all found in webrtc_vad.h.
|
||||
*/
|
||||
typedef int (*WebRtcNetEQ_VADInitFunction)(void *VAD_inst);
|
||||
typedef WebRtc_Word16 (*WebRtcNetEQ_VADSetmodeFunction)(void *VAD_inst, WebRtc_Word16 mode);
|
||||
typedef int (*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);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user