mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-12 15:45:18 +00:00
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:
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user