summaryrefslogtreecommitdiff
path: root/include/asterisk/audiohook.h
diff options
context:
space:
mode:
authorJoshua Colp <jcolp@digium.com>2008-03-12 18:29:33 +0000
committerJoshua Colp <jcolp@digium.com>2008-03-12 18:29:33 +0000
commit5fc569f5f51bbd2d05c45888034880bb0e4b150b (patch)
treec5468cf7feecf9f2cc9fcb0d0932231569647e06 /include/asterisk/audiohook.h
parentd4110872753759c624c83105cd0d34bc48251979 (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: https://origsvn.digium.com/svn/asterisk/trunk@108084 65c4cc65-6c06-0410-ace0-fbb531ad65f3
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 */