we used to use libresample which generated a lot of samples over the limit and that / 2 supressed the static it was causing.<br>We use the speex resampler now and it's much better, so i took the / 2 out in tree.<br><br>
<br><div class="gmail_quote">On Tue, Apr 7, 2009 at 10:02 AM, Anthony Minessale <span dir="ltr"><<a href="mailto:anthony.minessale@gmail.com">anthony.minessale@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
if everyone has such good ideas on how to improve it, I can't wait to see the patch.<div><div></div><div class="h5"><br><br><br><div class="gmail_quote">On Tue, Apr 7, 2009 at 9:42 AM, seven du <span dir="ltr"><<a href="mailto:seven@idapted.com" target="_blank">seven@idapted.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">And, actually the value to be normalized is 32bit and which generally<br>
is a sum of two 16bit values( read and write ), so it's probably easy<br>
to exceed 32767 if both end speaking at the same time.<br>
<div><div></div><div><br>
On Apr 7, 2009, at 12:15 PM, Nic Bellamy wrote:<br>
<br>
> Anthony Minessale wrote:<br>
>> 2) the macro is designed to fight clipping:<br>
>> When a sample exceeds the max size of the datatype we set it to<br>
>> the max value then cut the volume in half of that sample so it does<br>
>> not make too much noise. if we divide everything by 2 then all the<br>
>> volume would be reduced even on samples that fell inside the proper<br>
>> range.<br>
> Hi Anthony, all,<br>
> this is, in my opinion, actually going to give you far far uglier<br>
> audio artefacts than simply hard limiting the samples. Rather than try<br>
> and describe the resulting distortion, it's easier to just listen to<br>
> it<br>
> in action...<br>
><br>
> Each of the following files is about 100kb.<br>
><br>
> Original file (extracted from<br>
> freeswitch-sounds-en-us-callie-8000-1.0.7.tar.gz):<br>
> <a href="http://www.vadacom.co.nz/engineering/ivr-sample_submenu.wav" target="_blank">http://www.vadacom.co.nz/engineering/ivr-sample_submenu.wav</a><br>
><br>
><br>
> After 30dB gain and hard limiting samples to between -32768 and 32767:<br>
> <a href="http://www.vadacom.co.nz/engineering/ivr-sample_submenu-" target="_blank">http://www.vadacom.co.nz/engineering/ivr-sample_submenu-</a><br>
> hardlimited.wav<br>
><br>
><br>
> After 30dB gain and switch_normalize_to_16bit():<br>
> <a href="http://www.vadacom.co.nz/engineering/ivr-sample_submenu-switch_normalize_to_16bit.wav" target="_blank">http://www.vadacom.co.nz/engineering/ivr-sample_submenu-switch_normalize_to_16bit.wav</a><br>
><br>
><br>
> Cheers,<br>
> Nic.<br>
><br>
> --<br>
> Nic Bellamy,<br>
> Head Of Engineering, Vadacom Ltd - <a href="http://www.vadacom.co.nz/" target="_blank">http://www.vadacom.co.nz/</a><br>
><br>
><br>
> _______________________________________________<br>
> Freeswitch-dev mailing list<br>
> <a href="mailto:Freeswitch-dev@lists.freeswitch.org" target="_blank">Freeswitch-dev@lists.freeswitch.org</a><br>
> <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev</a><br>
> UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-dev" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-dev</a><br>
> <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br>
<br>
_______________________________________________<br>
Freeswitch-dev mailing list<br>
<a href="mailto:Freeswitch-dev@lists.freeswitch.org" target="_blank">Freeswitch-dev@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-dev" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-dev</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
</div></div></blockquote></div><br><br clear="all"><br></div></div>-- <br>Anthony Minessale II<br><br>FreeSWITCH <a href="http://www.freeswitch.org/" target="_blank">http://www.freeswitch.org/</a><br>ClueCon <a href="http://www.cluecon.com/" target="_blank">http://www.cluecon.com/</a><br>
<br>AIM: anthm<br><a href="mailto:MSN%3Aanthony_minessale@hotmail.com" target="_blank">MSN:anthony_minessale@hotmail.com</a><br>GTALK/JABBER/<a href="mailto:PAYPAL%3Aanthony.minessale@gmail.com" target="_blank">PAYPAL:anthony.minessale@gmail.com</a><br>
IRC: <a href="http://irc.freenode.net" target="_blank">irc.freenode.net</a> #freeswitch<br><br>FreeSWITCH Developer Conference<br><a href="mailto:sip%3A888@conference.freeswitch.org" target="_blank">sip:888@conference.freeswitch.org</a><br>
<a href="http://iax:guest@conference.freeswitch.org/888" target="_blank">iax:guest@conference.freeswitch.org/888</a><br>
<a href="mailto:googletalk%3Aconf%2B888@conference.freeswitch.org" target="_blank">googletalk:conf+888@conference.freeswitch.org</a><br>pstn:213-799-1400<br>
</blockquote></div><br><br clear="all"><br>-- <br>Anthony Minessale II<br><br>FreeSWITCH <a href="http://www.freeswitch.org/">http://www.freeswitch.org/</a><br>ClueCon <a href="http://www.cluecon.com/">http://www.cluecon.com/</a><br>
<br>AIM: anthm<br><a href="mailto:MSN%3Aanthony_minessale@hotmail.com">MSN:anthony_minessale@hotmail.com</a><br>GTALK/JABBER/<a href="mailto:PAYPAL%3Aanthony.minessale@gmail.com">PAYPAL:anthony.minessale@gmail.com</a><br>
IRC: <a href="http://irc.freenode.net">irc.freenode.net</a> #freeswitch<br><br>FreeSWITCH Developer Conference<br><a href="mailto:sip%3A888@conference.freeswitch.org">sip:888@conference.freeswitch.org</a><br><a href="http://iax:guest@conference.freeswitch.org/888">iax:guest@conference.freeswitch.org/888</a><br>
<a href="mailto:googletalk%3Aconf%2B888@conference.freeswitch.org">googletalk:conf+888@conference.freeswitch.org</a><br>pstn:213-799-1400<br>