[asterisk-dev] downsampling slinear16 to ulaw (or alaw or g729)

Paul Albrecht albrecht at glccom.com
Tue Aug 31 13:17:56 CDT 2010


On Tue, 2010-08-31 at 12:52 -0500, Kevin P. Fleming wrote:
> On 08/31/2010 11:55 AM, Paul Albrecht wrote:
> 
> > Ignore my previous post ... after I did some more testing the problem
> > started again. What's strange is that it worked once after I recompiled
> > and then the truncation occured for all subsequent runs of my test
> > program. I'll submit a bug report this afternoon.
> 
> Heisenbugs like that are frequently caused by code not doing everything
> required to ensure the environment is setup properly. For example, are
> you ensuring that the frame structure and its data properly zeroed
> before you begin filling them in and passing them to API calls? Are you
> attempting to reuse the frame you get back from the translation process
> without copying it?
> 

The only time I got a different result was once after I recompiled
asterisk. Now every time I have run the program I get the same result. I
think the frame is set up correctly. You can check the code fragment I
use to initialize the input frame I sent in a previous post. Lastly, I
always use the same input frame for translation which is not consumed on
the call to the translator.

> -- 
> Kevin P. Fleming
> Digium, Inc. | Director of Software Technologies
> 445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
> skype: kpfleming | jabber: kfleming at digium.com
> Check us out at www.digium.com & www.asterisk.org
> 
-- 
Paul Albrecht




More information about the asterisk-dev mailing list