[Asterisk-Dev] Re: Handling AST_FORMAT_SLINEAR at 48000Hz

Tony Mountifield tony at softins.clara.co.uk
Thu Nov 17 03:28:47 MST 2005


In article <cb2ad8b50511162204i7fcb9a20g78ef72782e80b26f at mail.gmail.com>,
Carlos Antunes <cmantunes at gmail.com> wrote:
> 
> On 11/17/05, voipwala hindustani <voipwala at gmail.com> wrote:
> >
> > But inside asterisk AST_FORMAT_SLINEAR is assumed to be of 8000Hz sampled
> > voice. But in my case it is 48000Hz sampled.
> 
> You need to do a thing called decimation (or downsampling). The easiest way
> is to make the 48kHz signal go through a first order low-pass filter with
> cutoff frequency at 4kHz and then collect every 6th sample. You can then
> assemble the new stream as signed lineat at 8kHz.

The low-pass filter sounds complicated. How would that compare with, say,
taking the mean average of every six 48kHz samples to produce one 8kHz
sample?

Cheers
Tony
-- 
Tony Mountifield
Work: tony at softins.co.uk - http://www.softins.co.uk
Play: tony at mountifield.org - http://tony.mountifield.org



More information about the asterisk-dev mailing list