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

Anthony Minessale anthony.minessale at gmail.com
Tue Apr 7 08:02:43 PDT 2009


if everyone has such good ideas on how to improve it, I can't wait to see
the patch.


On Tue, Apr 7, 2009 at 9:42 AM, seven du <seven at idapted.com> wrote:

> 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
>
>
> _______________________________________________
> 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
>



-- 
Anthony Minessale II

FreeSWITCH http://www.freeswitch.org/
ClueCon http://www.cluecon.com/

AIM: anthm
MSN:anthony_minessale at hotmail.com <MSN%3Aanthony_minessale at hotmail.com>
GTALK/JABBER/PAYPAL:anthony.minessale at gmail.com<PAYPAL%3Aanthony.minessale at gmail.com>
IRC: irc.freenode.net #freeswitch

FreeSWITCH Developer Conference
sip:888 at conference.freeswitch.org <sip%3A888 at conference.freeswitch.org>
iax:guest at conference.freeswitch.org/888
googletalk:conf+888 at conference.freeswitch.org<googletalk%3Aconf%2B888 at conference.freeswitch.org>
pstn:213-799-1400
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-dev/attachments/20090407/2e50ef3a/attachment.html 


More information about the Freeswitch-dev mailing list