[asterisk-commits] dvossel: branch dvossel/funk_effects r248581 - /team/dvossel/funk_effects/funcs/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Feb 24 12:54:25 CST 2010


Author: dvossel
Date: Wed Feb 24 12:54:22 2010
New Revision: 248581

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=248581
Log:
fixes crash and makes audio less distorted

Modified:
    team/dvossel/funk_effects/funcs/func_pitchshift.c

Modified: team/dvossel/funk_effects/funcs/func_pitchshift.c
URL: http://svnview.digium.com/svn/asterisk/team/dvossel/funk_effects/funcs/func_pitchshift.c?view=diff&rev=248581&r1=248580&r2=248581
==============================================================================
--- team/dvossel/funk_effects/funcs/func_pitchshift.c (original)
+++ team/dvossel/funk_effects/funcs/func_pitchshift.c Wed Feb 24 12:54:22 2010
@@ -137,6 +137,10 @@
 	struct ast_datastore *datastore = NULL;
 	struct pitchshift_data *shift = NULL;
 
+
+	if (!f) {
+		return 0;
+	}
 	if ((audiohook->status == AST_AUDIOHOOK_STATUS_DONE) ||
 		(f->frametype != AST_FRAME_VOICE) ||
 		((f->subclass.codec != AST_FORMAT_SLINEAR) &&
@@ -419,7 +423,7 @@
 		return 0;
 	}
 	for (samples = 0; samples < f->samples; samples += 32) {
-		smb_pitch_shift(amount, 32, 128, 32, ast_format_rate(f->subclass.codec), fun+samples, fun+samples, fft);
+		smb_pitch_shift(amount, 32, 256, 32, ast_format_rate(f->subclass.codec), fun+samples, fun+samples, fft);
 	}
 
 	return 0;




More information about the asterisk-commits mailing list