aboutsummaryrefslogtreecommitdiffstats
path: root/include/asterisk/audiohook.h
diff options
context:
space:
mode:
authorfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2008-03-12 18:29:33 +0000
committerfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2008-03-12 18:29:33 +0000
commitcf9baf7ab7f33dbce3bc774bd4121c084baa26ca (patch)
treec5468cf7feecf9f2cc9fcb0d0932231569647e06 /include/asterisk/audiohook.h
parent6fb0c142de194ae802e7cafa4025b19817c2be30 (diff)
Merged revisions 108083 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r108083 | file | 2008-03-12 15:26:37 -0300 (Wed, 12 Mar 2008) | 4 lines Add a trigger mode that triggers on both read and write. The actual function that returns the combined audio frame though will wait until both sides have fed in audio, or until one side stops (such as the case when you call Wait). (closes issue #11945) Reported by: xheliox ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@108084 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'include/asterisk/audiohook.h')
-rw-r--r--include/asterisk/audiohook.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/asterisk/audiohook.h b/include/asterisk/audiohook.h
index 5ef0ac294..ba5d3b899 100644
--- a/include/asterisk/audiohook.h
+++ b/include/asterisk/audiohook.h
@@ -57,6 +57,7 @@ enum ast_audiohook_flags {
AST_AUDIOHOOK_TRIGGER_READ = (1 << 0), /*!< Audiohook wants to be triggered when reading audio in */
AST_AUDIOHOOK_TRIGGER_WRITE = (2 << 0), /*!< Audiohook wants to be triggered when writing audio out */
AST_AUDIOHOOK_WANTS_DTMF = (1 << 1), /*!< Audiohook also wants to receive DTMF frames */
+ AST_AUDIOHOOK_TRIGGER_SYNC = (1 << 2), /*!< Audiohook wants to be triggered when both sides have combined audio available */
};
struct ast_audiohook;
@@ -86,6 +87,8 @@ struct ast_audiohook {
unsigned int flags; /*!< Flags on the audiohook */
struct ast_slinfactory read_factory; /*!< Factory where frames read from the channel, or read from the whisper source will go through */
struct ast_slinfactory write_factory; /*!< Factory where frames written to the channel will go through */
+ struct timeval read_time; /*!< Last time read factory was fed */
+ struct timeval write_time; /*!< Last time write factory was fed */
int format; /*!< Format translation path is setup as */
struct ast_trans_pvt *trans_pvt; /*!< Translation path for reading frames */
ast_audiohook_manipulate_callback manipulate_callback; /*!< Manipulation callback */