[asterisk-dev] How to create a slinear silent frame?

Kaloyan Kovachev kkovachev at varna.net
Tue May 19 04:03:20 CDT 2009


On Mon, 18 May 2009 11:43:11 -0500, Russell Bryant wrote
> Kaloyan Kovachev wrote:
> >> If you need frame level access to a beep, your best bet is to use the
> >> file stream API.  You can open a beep sound file with ast_openstream()
> >> and then call ast_readframe() to get each frame.
> > 
> > ast_openstream() requires a channel ... is it possible to open a filestream in
> > SLINEAR without the need for a channel?
> 
> You're right, it requires a channel.
> 
> If you do not have a channel, you can open a file stream with
> ast_readfile().  res/res_convert.c is an example of a module that opens
> a sound file and reads from it without a channel.  It also uses
> ast_writefile() to open a file to write audio to without a channel.
> 

Thanks i'll take a look at res_convert, but just a quick question about
transcoding - does ast_openstream() takes care for the transcoding to SLIN in
case there is just .gsm?

> -- 
> Russell Bryant
> Digium, Inc. | Senior Software Engineer, Open Source Team Lead
> 445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
> Check us out at: www.digium.com & www.asterisk.org
> 
> _______________________________________________
> --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




More information about the asterisk-dev mailing list