Changeset 203 for pjproject/trunk/pjmedia/include/pjmedia/vad.h
- Timestamp:
- Feb 20, 2006 1:28:25 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjmedia/include/pjmedia/vad.h
r202 r203 27 27 #include <pjmedia/types.h> 28 28 29 PJ_BEGIN_DECL 30 29 31 30 32 /** 31 * Opaque data type for pjmedia vad.33 * @see pjmedia_vad 32 34 */ 33 35 typedef struct pjmedia_vad pjmedia_vad; … … 49 51 50 52 /** 53 * Set the vad to operate in adaptive mode. 54 * 55 * @param vad The vad 56 * @param frame_size Number of samplse per frame. 57 * 58 * @return PJ_SUCCESS on success. 59 */ 60 PJ_DECL(pj_status_t) pjmedia_vad_set_adaptive( pjmedia_vad *vad, 61 unsigned frame_size); 62 63 64 /** 65 * Set the vad to operate in fixed threshold mode. 66 * 67 * @param vad The vad 68 * @param frame_size Number of samplse per frame. 69 * @param threshold The silence threshold. 70 * 71 * @return PJ_SUCCESS on success. 72 */ 73 PJ_DECL(pj_status_t) pjmedia_vad_set_fixed( pjmedia_vad *vad, 74 unsigned frame_size, 75 unsigned threshold ); 76 77 /** 78 * Disable the vad. 79 * 80 * @param vad The vad 81 * 82 * @return PJ_SUCCESS on success. 83 */ 84 PJ_DECL(pj_status_t) pjmedia_vad_disable( pjmedia_vad *vad ); 85 86 87 /** 51 88 * Calculate average signal level for the given samples. 52 89 * … … 57 94 * divided by number of samples. 58 95 */ 59 PJ_DECL(pj_ uint32_t) pjmedia_vad_calc_avg_signal_level(pj_int16_t samples[],60 96 PJ_DECL(pj_int32_t) pjmedia_vad_calc_avg_signal( const pj_int16_t samples[], 97 pj_size_t count ); 61 98 62 99 … … 67 104 * @param samples Pointer to 16-bit PCM input samples. 68 105 * @param count Number of samples in the input. 69 * @param p_silence Pointer to receive the silence detection result. 70 * Non-zero value indicates that that input is considered 71 * as silence. 106 * @param p_level Optional pointer to receive average signal level 107 * of the input samples. 72 108 * 73 109 * @return PJ_SUCCESS on success. 74 110 */ 75 PJ_DECL(pj_ status_t) pjmedia_vad_detect_silence( pjmedia_vad *vad,76 77 78 pj_bool_t *p_silence);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); 79 115 80 116 117 PJ_END_DECL 81 118 82 119 #endif /* __PJMEDIA_VAD_H__ */
Note: See TracChangeset
for help on using the changeset viewer.