summaryrefslogtreecommitdiff
path: root/include/asterisk/dsp.h
diff options
context:
space:
mode:
authorTilghman Lesher <tilghman@meg.abyt.es>2008-03-05 16:23:44 +0000
committerTilghman Lesher <tilghman@meg.abyt.es>2008-03-05 16:23:44 +0000
commit8a411ccf839654d3c15452c2f25831693e741baf (patch)
treef1786eed45ddc28e1bf43faafd02bcc917747afd /include/asterisk/dsp.h
parentc6585e5b5d8679cdb2b258145455606c23e217bb (diff)
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
Diffstat (limited to 'include/asterisk/dsp.h')
-rw-r--r--include/asterisk/dsp.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/include/asterisk/dsp.h b/include/asterisk/dsp.h
index 10ed53d1b..1235c3ae0 100644
--- a/include/asterisk/dsp.h
+++ b/include/asterisk/dsp.h
@@ -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 */