On 08 Apr 2014, at 13:45, Joshua Colp <[email protected]> wrote:

> Olle E. Johansson wrote:
>> On 08 Apr 2014, at 13:32, Joshua Colp<[email protected]>  wrote:
>> 
>>> Olle E. Johansson wrote:
>>>> Hi!
>>> Kia ora,
>>> 
>>>> In my adventures with silence detection and suppression I want
>>>> my audiohook to drop frames. I see that I can manipulate but can
>>>> I also drop frames?
>>> Right now the manipulation expects the contents of the audio frame
>>> to be changed, not the entire frame itself to be changed of type so
>>> two things come to mind:
>>> 
>>> 1. Change the frame enough to make it seem as though it does not
>>> contain any audio. Changing datalen for example.
>>> 
>>> 2. Make it so manipulate can return NULL to indicate it has
>>> suppressed the frame. This shouldn't be that bad. The audiohook got
>>> just has to replace the frame with&ast_null_frame if a manipulation
>>> audiohook returns NULL.
>> 
>> 
>> 3. Invent AST_FRAME_DROP and make sure that we drop it instead of
>> sending it out to network...
> 
> That's what &ast_null_frame is for. It's a globally created frame which is 
> used to replace frames with nothing or return a frame when no real frame 
> exists to return. It just passes through stuff and nothing happens with it, 
> since it contains er well nothing. Since it is globally created it also 
> doesn't incur a memory allocation in most cases.

Right. What you mean is that there's no way around it, just go for option #2 
and do what Josh says again... ;-)

My DSP doesn't do what I want it to. Something happened along the way...
/O
-- 
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-dev

Reply via email to