[Freeswitch-dev] Audio hard-limiting vs. switch_normalize_to_16bit (was: Re: Codes I don't understand)

seven du seven at idapted.com
Tue Apr 7 07:42:27 PDT 2009


And, actually the value to be normalized is 32bit and which generally  
is a sum of two 16bit values( read and write ), so it's probably easy  
to exceed 32767 if both end speaking at the same time.

On Apr 7, 2009, at 12:15 PM, Nic Bellamy wrote:

> Anthony Minessale wrote:
>> 2) the macro is designed to fight clipping:
>>    When a sample exceeds the max size of the datatype we set it to
>> the max value then cut the volume in half of that sample so it does
>> not make too much noise.  if we divide everything by 2 then all the
>> volume would be reduced even on samples that fell inside the proper  
>> range.
> Hi Anthony, all,
>    this is, in my opinion, actually going to give you far far uglier
> audio artefacts than simply hard limiting the samples. Rather than try
> and describe the resulting distortion, it's easier to just listen to  
> it
> in action...
>
> Each of the following files is about 100kb.
>
> Original file (extracted from
> freeswitch-sounds-en-us-callie-8000-1.0.7.tar.gz):
> http://www.vadacom.co.nz/engineering/ivr-sample_submenu.wav
>
>
> After 30dB gain and hard limiting samples to between -32768 and 32767:
> http://www.vadacom.co.nz/engineering/ivr-sample_submenu- 
> hardlimited.wav
>
>
> After 30dB gain and switch_normalize_to_16bit():
> http://www.vadacom.co.nz/engineering/ivr-sample_submenu-switch_normalize_to_16bit.wav
>
>
> Cheers,
>    Nic.
>
> -- 
> Nic Bellamy,
> Head Of Engineering, Vadacom Ltd - http://www.vadacom.co.nz/
>
>
> _______________________________________________
> Freeswitch-dev mailing list
> Freeswitch-dev at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev
> http://www.freeswitch.org




More information about the Freeswitch-dev mailing list