diff options
author | Jenkins2 <jenkins2@gerrit.asterisk.org> | 2018-02-01 11:36:00 -0600 |
---|---|---|
committer | Gerrit Code Review <gerrit2@gerrit.digium.api> | 2018-02-01 11:36:00 -0600 |
commit | f041bc7863833c2d6b90b585694132171bc27aa2 (patch) | |
tree | 79be6672c132450deb1e341d5c36a4b17ddb5293 /include | |
parent | b1484537084ed560df14b8c0bb563948411fcbbb (diff) | |
parent | b9024197abb490ea2cada4046446023c2179542e (diff) |
Merge "app_confbridge: Update dsp_silence_threshold and dsp_talking_threshold docs."
Diffstat (limited to 'include')
-rw-r--r-- | include/asterisk/bridge_technology.h | 6 | ||||
-rw-r--r-- | include/asterisk/dsp.h | 38 |
2 files changed, 32 insertions, 12 deletions
diff --git a/include/asterisk/bridge_technology.h b/include/asterisk/bridge_technology.h index eaea28de5..12fd49917 100644 --- a/include/asterisk/bridge_technology.h +++ b/include/asterisk/bridge_technology.h @@ -46,11 +46,9 @@ enum ast_bridge_preference { * performing talking optimizations. */ struct ast_bridge_tech_optimizations { - /*! The amount of time in ms that talking must be detected before - * the dsp determines that talking has occurred */ + /*! Minimum average magnitude threshold to determine talking by the DSP. */ unsigned int talking_threshold; - /*! The amount of time in ms that silence must be detected before - * the dsp determines that talking has stopped */ + /*! Time in ms of silence necessary to declare talking stopped by the bridge. */ unsigned int silence_threshold; /*! Whether or not the bridging technology should drop audio * detected as silence from the mix. */ diff --git a/include/asterisk/dsp.h b/include/asterisk/dsp.h index 7e84ebe9c..d092e6b4c 100644 --- a/include/asterisk/dsp.h +++ b/include/asterisk/dsp.h @@ -87,7 +87,7 @@ void ast_dsp_free(struct ast_dsp *dsp); * created with */ unsigned int ast_dsp_get_sample_rate(const struct ast_dsp *dsp); -/*! \brief Set threshold value for silence */ +/*! \brief Set the minimum average magnitude threshold to determine talking by the DSP. */ void ast_dsp_set_threshold(struct ast_dsp *dsp, int threshold); /*! \brief Set number of required cadences for busy */ @@ -106,19 +106,41 @@ int ast_dsp_set_call_progress_zone(struct ast_dsp *dsp, char *zone); busies, and call progress, all dependent upon which features are enabled */ struct ast_frame *ast_dsp_process(struct ast_channel *chan, struct ast_dsp *dsp, struct ast_frame *inf); -/*! \brief Return non-zero if this is silence. Updates "totalsilence" with the total - number of seconds of silence */ +/*! + * \brief Process the audio frame for silence. + * + * \param dsp DSP processing audio media. + * \param f Audio frame to process. + * \param totalsilence Variable to set to the total accumulated silence in ms + * seen by the DSP since the last noise. + * + * \return Non-zero if the frame is silence. + */ int ast_dsp_silence(struct ast_dsp *dsp, struct ast_frame *f, int *totalsilence); -/*! \brief Return non-zero if this is silence. Updates "totalsilence" with the total - number of seconds of silence. Returns the average energy of the samples in the frame - in frames_energy variable. */ +/*! + * \brief Process the audio frame for silence. + * + * \param dsp DSP processing audio media. + * \param f Audio frame to process. + * \param totalsilence Variable to set to the total accumulated silence in ms + * seen by the DSP since the last noise. + * \param frames_energy Variable to set to the average energy of the samples in the frame. + * + * \return Non-zero if the frame is silence. + */ int ast_dsp_silence_with_energy(struct ast_dsp *dsp, struct ast_frame *f, int *totalsilence, int *frames_energy); /*! - * \brief Return non-zero if this is noise. Updates "totalnoise" with the total - * number of seconds of noise + * \brief Process the audio frame for noise. * \since 1.6.1 + * + * \param dsp DSP processing audio media. + * \param f Audio frame to process. + * \param totalnoise Variable to set to the total accumulated noise in ms + * seen by the DSP since the last silence. + * + * \return Non-zero if the frame is silence. */ int ast_dsp_noise(struct ast_dsp *dsp, struct ast_frame *f, int *totalnoise); |