Ignore:
Timestamp:
Feb 25, 2006 2:04:42 AM (18 years ago)
Author:
bennylp
Message:

Synched with documentation

File:
1 moved

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjmedia/include/pjmedia/silencedet.h

    r222 r228  
    1717 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA  
    1818 */ 
    19 #ifndef __PJMEDIA_VAD_H__ 
    20 #define __PJMEDIA_VAD_H__ 
     19#ifndef __PJMEDIA_SILENCE_DET_H__ 
     20#define __PJMEDIA_SILENCE_DET_H__ 
    2121 
    2222 
    2323/** 
    24  * @file vad.h 
    25  * @brief Simple, adaptive silence detector. 
     24 * @file silencedet.h 
     25 * @brief Adaptive silence detector. 
    2626 */ 
    2727#include <pjmedia/types.h> 
     
    3131 
    3232/** 
    33  * @see pjmedia_vad 
     33 * Opaque declaration for silence detector. 
    3434 */ 
    35 typedef struct pjmedia_vad  pjmedia_vad; 
     35typedef struct pjmedia_silence_det pjmedia_silence_det; 
    3636 
    3737 
     
    4242 * 
    4343 * @param pool          Pool for allocating the structure. 
    44  * @param p_vad         Pointer to receive the VAD instance. 
     44 * @param p_sd          Pointer to receive the silence detector instance. 
    4545 * 
    4646 * @return              PJ_SUCCESS on success. 
    4747 */ 
    48 PJ_DECL(pj_status_t) pjmedia_vad_create( pj_pool_t *pool, 
    49                                          pjmedia_vad **p_vad ); 
     48PJ_DECL(pj_status_t) pjmedia_silence_det_create( pj_pool_t *pool, 
     49                                                 pjmedia_silence_det **p_sd ); 
    5050 
    5151 
    5252/** 
    53  * Set the vad to operate in adaptive mode. 
     53 * Set the sd to operate in adaptive mode. 
    5454 * 
    55  * @param vad               The vad 
    56  * @param frame_size Number of samplse per frame. 
     55 * @param sd            The silence detector 
     56 * @param frame_size    Number of samples per frame. 
    5757 * 
    58  * @return                  PJ_SUCCESS on success. 
     58 * @return              PJ_SUCCESS on success. 
    5959 */ 
    60 PJ_DECL(pj_status_t) pjmedia_vad_set_adaptive( pjmedia_vad *vad, 
    61                                                unsigned frame_size); 
     60PJ_DECL(pj_status_t) pjmedia_silence_det_set_adaptive( pjmedia_silence_det *sd, 
     61                                                       unsigned frame_size); 
    6262 
    6363 
    6464/** 
    65  * Set the vad to operate in fixed threshold mode. 
     65 * Set the sd to operate in fixed threshold mode. 
    6666 * 
    67  * @param vad               The vad 
     67 * @param sd                The silence detector 
    6868 * @param frame_size Number of samplse per frame. 
    6969 * @param threshold         The silence threshold. 
     
    7171 * @return                  PJ_SUCCESS on success. 
    7272 */ 
    73 PJ_DECL(pj_status_t) pjmedia_vad_set_fixed( pjmedia_vad *vad, 
    74                                             unsigned frame_size, 
    75                                             unsigned threshold ); 
     73PJ_DECL(pj_status_t) pjmedia_silence_det_set_fixed( pjmedia_silence_det *sd, 
     74                                                    unsigned frame_size, 
     75                                                    unsigned threshold ); 
    7676 
    7777/** 
    78  * Disable the vad. 
     78 * Disable the silence detector. 
    7979 * 
    80  * @param vad           The vad 
     80 * @param sd            The silence detector 
    8181 * 
    8282 * @return              PJ_SUCCESS on success. 
    8383 */ 
    84 PJ_DECL(pj_status_t) pjmedia_vad_disable( pjmedia_vad *vad ); 
     84PJ_DECL(pj_status_t) pjmedia_silence_det_disable( pjmedia_silence_det *sd ); 
    8585 
    8686 
     
    9494 *                      divided by number of samples. 
    9595 */ 
    96 PJ_DECL(pj_int32_t) pjmedia_vad_calc_avg_signal( const pj_int16_t samples[], 
    97                                                 pj_size_t count ); 
     96PJ_DECL(pj_int32_t) pjmedia_silence_det_calc_avg_signal( const pj_int16_t samples[], 
     97                                                        pj_size_t count ); 
    9898 
    9999 
     
    101101 * Perform voice activity detection on the given input samples. 
    102102 * 
    103  * @param vad           The VAD instance. 
     103 * @param sd            The silence detector instance. 
    104104 * @param samples       Pointer to 16-bit PCM input samples. 
    105105 * @param count         Number of samples in the input. 
     
    109109 * @return              PJ_SUCCESS on success. 
    110110 */ 
    111 PJ_DECL(pj_bool_t) pjmedia_vad_detect_silence( pjmedia_vad *vad, 
    112                                                const pj_int16_t samples[], 
    113                                                pj_size_t count, 
    114                                                pj_int32_t *p_level); 
     111PJ_DECL(pj_bool_t) pjmedia_silence_det_detect_silence( pjmedia_silence_det *sd, 
     112                                                       const pj_int16_t samples[], 
     113                                                       pj_size_t count, 
     114                                                       pj_int32_t *p_level); 
    115115 
    116116 
    117117PJ_END_DECL 
    118118 
    119 #endif  /* __PJMEDIA_VAD_H__ */ 
     119#endif  /* __PJMEDIA_SILENCE_DET_H__ */ 
    120120 
Note: See TracChangeset for help on using the changeset viewer.