[asterisk-commits] russell: branch russell/res_monkeys r81323 - in /team/russell/res_monkeys: in...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue Aug 28 18:01:14 CDT 2007
Author: russell
Date: Tue Aug 28 18:01:14 2007
New Revision: 81323
URL: http://svn.digium.com/view/asterisk?view=rev&rev=81323
Log:
Call the whisper callback when the audiohook gets detached so its owner can
destroy it. Also, no need for the userdata to be explicitly passed in the
whisper callback, as it is available on the audiohook directly.
Modified:
team/russell/res_monkeys/include/asterisk/audiohook.h
team/russell/res_monkeys/main/audiohook.c
Modified: team/russell/res_monkeys/include/asterisk/audiohook.h
URL: http://svn.digium.com/view/asterisk/team/russell/res_monkeys/include/asterisk/audiohook.h?view=diff&rev=81323&r1=81322&r2=81323
==============================================================================
--- team/russell/res_monkeys/include/asterisk/audiohook.h (original)
+++ team/russell/res_monkeys/include/asterisk/audiohook.h Tue Aug 28 18:01:14 2007
@@ -68,8 +68,8 @@
*/
typedef int (*ast_audiohook_manipulate_callback)(struct ast_audiohook *audiohook, struct ast_channel *chan, struct ast_frame *frame, enum ast_audiohook_direction direction);
-typedef int (*ast_audiohook_whisper_callback(struct ast_audiohook *audiohook,
- struct ast_channel *chan, unsigned int samples, void *user_data);
+typedef int (*ast_audiohook_whisper_callback)(struct ast_audiohook *audiohook,
+ struct ast_channel *chan, unsigned int samples);
struct ast_audiohook_options {
int read_volume; /*!< Volume adjustment on frames read from the channel the hook is on */
@@ -89,7 +89,7 @@
struct ast_trans_pvt *trans_pvt; /*!< Translation path for reading frames */
ast_audiohook_manipulate_callback manipulate_callback; /*!< Manipulation callback */
ast_audiohook_whisper_callback whisper_callback; /*!< Whisper callback */
- void *user_data; /*!< User data for whisper callback */
+ void *user_data; /*!< User data related to this audiohook */
struct ast_audiohook_options options; /*!< Applicable options */
AST_LIST_ENTRY(ast_audiohook) list; /*!< Linked list information */
};
Modified: team/russell/res_monkeys/main/audiohook.c
URL: http://svn.digium.com/view/asterisk/team/russell/res_monkeys/main/audiohook.c?view=diff&rev=81323&r1=81322&r2=81323
==============================================================================
--- team/russell/res_monkeys/main/audiohook.c (original)
+++ team/russell/res_monkeys/main/audiohook.c Tue Aug 28 18:01:14 2007
@@ -360,6 +360,8 @@
audiohook->status = AST_AUDIOHOOK_STATUS_DONE;
ast_cond_signal(&audiohook->trigger);
ast_audiohook_unlock(audiohook);
+ if (audiohook->whisper_callback)
+ audiohook->whisper_callback(audiohook, NULL, 0);
}
AST_LIST_TRAVERSE_SAFE_END
More information about the asterisk-commits
mailing list