Merge audiohooks branch into trunk. This is a new API for developers to listen and manipulate the audio going through a channel.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@78649 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Joshua Colp
2007-08-08 19:30:52 +00:00
parent 082322685f
commit 602198c402
11 changed files with 1113 additions and 913 deletions

View File

@@ -148,3 +148,21 @@ unsigned int ast_slinfactory_available(const struct ast_slinfactory *sf)
{
return sf->size;
}
void ast_slinfactory_flush(struct ast_slinfactory *sf)
{
struct ast_frame *fr = NULL;
if (sf->trans) {
ast_translator_free_path(sf->trans);
sf->trans = NULL;
}
while ((fr = AST_LIST_REMOVE_HEAD(&sf->queue, frame_list)))
ast_frfree(fr);
sf->size = sf->holdlen = 0;
sf->offset = sf->hold;
return;
}