Create a centralized configuration option for silencethreshold

(closes issue #11236)
 Reported by: philipps
 Patches: 
       20080218__bug11236.diff.txt uploaded by Corydon76 (license 14)
 Tested by: philipps


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@106072 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Tilghman Lesher
2008-03-05 16:23:44 +00:00
parent c6585e5b5d
commit 8a411ccf83
17 changed files with 248 additions and 111 deletions

View File

@@ -58,6 +58,13 @@
struct ast_dsp;
enum threshold {
/* Array offsets */
THRESHOLD_SILENCE = 0,
/* Always the last */
THRESHOLD_MAX = 1,
};
struct ast_dsp *ast_dsp_new(void);
void ast_dsp_free(struct ast_dsp *dsp);
@@ -84,6 +91,10 @@ struct ast_frame *ast_dsp_process(struct ast_channel *chan, struct ast_dsp *dsp,
number of seconds of silence */
int ast_dsp_silence(struct ast_dsp *dsp, struct ast_frame *f, int *totalsilence);
/*! \brief Return non-zero if this is noise. Updates "totalnoise" with the total
number of seconds of noise */
int ast_dsp_noise(struct ast_dsp *dsp, struct ast_frame *f, int *totalnoise);
/*! \brief Return non-zero if historically this should be a busy, request that
ast_dsp_silence has already been called */
int ast_dsp_busydetect(struct ast_dsp *dsp);
@@ -115,4 +126,12 @@ int ast_dsp_get_tstate(struct ast_dsp *dsp);
/*! \brief Get tcount (Threshold counter) */
int ast_dsp_get_tcount(struct ast_dsp *dsp);
/*! \brief Get silence threshold from dsp.conf*/
int ast_dsp_get_threshold_from_settings(enum threshold which);
/* \brief Reloads dsp settings from dsp.conf*/
int ast_dsp_reload(void);
int ast_dsp_init(void);
#endif /* _ASTERISK_DSP_H */