if everyone has such good ideas on how to improve it, I can&#39;t wait to see the patch.<br><br><br><div class="gmail_quote">On Tue, Apr 7, 2009 at 9:42 AM, seven du <span dir="ltr">&lt;<a href="mailto:seven@idapted.com">seven@idapted.com</a>&gt;</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&#39;s probably easy<br>
to exceed 32767 if both end speaking at the same time.<br>
<div><div></div><div class="h5"><br>
On Apr 7, 2009, at 12:15 PM, Nic Bellamy wrote:<br>
<br>
&gt; Anthony Minessale wrote:<br>
&gt;&gt; 2) the macro is designed to fight clipping:<br>
&gt;&gt;    When a sample exceeds the max size of the datatype we set it to<br>
&gt;&gt; the max value then cut the volume in half of that sample so it does<br>
&gt;&gt; not make too much noise.  if we divide everything by 2 then all the<br>
&gt;&gt; volume would be reduced even on samples that fell inside the proper<br>
&gt;&gt; range.<br>
&gt; Hi Anthony, all,<br>
&gt;    this is, in my opinion, actually going to give you far far uglier<br>
&gt; audio artefacts than simply hard limiting the samples. Rather than try<br>
&gt; and describe the resulting distortion, it&#39;s easier to just listen to<br>
&gt; it<br>
&gt; in action...<br>
&gt;<br>
&gt; Each of the following files is about 100kb.<br>
&gt;<br>
&gt; Original file (extracted from<br>
&gt; freeswitch-sounds-en-us-callie-8000-1.0.7.tar.gz):<br>
&gt; <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>
&gt;<br>
&gt;<br>
&gt; After 30dB gain and hard limiting samples to between -32768 and 32767:<br>
&gt; <a href="http://www.vadacom.co.nz/engineering/ivr-sample_submenu-" target="_blank">http://www.vadacom.co.nz/engineering/ivr-sample_submenu-</a><br>
&gt; hardlimited.wav<br>
&gt;<br>
&gt;<br>
&gt; After 30dB gain and switch_normalize_to_16bit():<br>
&gt; <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>
&gt;<br>
&gt;<br>
&gt; Cheers,<br>
&gt;    Nic.<br>
&gt;<br>
&gt; --<br>
&gt; Nic Bellamy,<br>
&gt; Head Of Engineering, Vadacom Ltd - <a href="http://www.vadacom.co.nz/" target="_blank">http://www.vadacom.co.nz/</a><br>
&gt;<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; Freeswitch-dev mailing list<br>
&gt; <a href="mailto:Freeswitch-dev@lists.freeswitch.org">Freeswitch-dev@lists.freeswitch.org</a><br>
&gt; <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev</a><br>
&gt; UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-dev" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-dev</a><br>
&gt; <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">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>-- <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>