[asterisk-commits] russell: trunk r98308 - /trunk/codecs/codec_resample.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Jan 11 13:05:25 CST 2008


Author: russell
Date: Fri Jan 11 13:05:24 2008
New Revision: 98308

URL: http://svn.digium.com/view/asterisk?view=rev&rev=98308
Log:
Kevin noted that the thing that I _actually_ changed here was that I converted
a value from a double, to a float, back to a double.  Sure enough, when I changed
my interim variable back to a double, it still blows up.  Switching all of these
to a float fixes the problem.  This seems like a compiler bug where a double passed
as an argument isn't getting properly aligned, so I'll have to see if I can replicate
it with a small test program.

(related to issue #11725)

Modified:
    trunk/codecs/codec_resample.c

Modified: trunk/codecs/codec_resample.c
URL: http://svn.digium.com/view/asterisk/trunk/codecs/codec_resample.c?view=diff&rev=98308&r1=98307&r2=98308
==============================================================================
--- trunk/codecs/codec_resample.c (original)
+++ trunk/codecs/codec_resample.c Fri Jan 11 13:05:24 2008
@@ -49,12 +49,12 @@
 
 struct slin16_to_slin8_pvt {
 	void *resampler;
-	double resample_factor;
+	float resample_factor;
 };
 
 struct slin8_to_slin16_pvt {
 	void *resampler;
-	double resample_factor;
+	float resample_factor;
 };
 
 static int slin16_to_slin8_new(struct ast_trans_pvt *pvt)
@@ -98,7 +98,7 @@
 }
 
 static int resample_frame(struct ast_trans_pvt *pvt,
-	void *resampler, double resample_factor, struct ast_frame *f)
+	void *resampler, float resample_factor, struct ast_frame *f)
 {
 	int total_in_buf_used = 0;
 	int total_out_buf_used = 0;




More information about the asterisk-commits mailing list