[asterisk-commits] qwell: branch qwell/codec_consistency r110617 - /team/qwell/codec_consistency...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Mon Mar 24 12:43:09 CDT 2008
Author: qwell
Date: Mon Mar 24 12:43:09 2008
New Revision: 110617
URL: http://svn.digium.com/view/asterisk?view=rev&rev=110617
Log:
Make it even more obvious what these numbers are. destrate divided by srcrate = resample_factor
Modified:
team/qwell/codec_consistency/codecs/codec_resample.c
Modified: team/qwell/codec_consistency/codecs/codec_resample.c
URL: http://svn.digium.com/view/asterisk/team/qwell/codec_consistency/codecs/codec_resample.c?view=diff&rev=110617&r1=110616&r2=110617
==============================================================================
--- team/qwell/codec_consistency/codecs/codec_resample.c (original)
+++ team/qwell/codec_consistency/codecs/codec_resample.c Mon Mar 24 12:43:09 2008
@@ -61,9 +61,9 @@
{
struct slin16_to_slin8_pvt *resamp_pvt = pvt->pvt;
- resamp_pvt->resample_factor = 0.5;
-
- if (!(resamp_pvt->resampler = resample_open(RESAMPLER_QUALITY, 0.5, 0.5)))
+ resamp_pvt->resample_factor = 8000.0 / 16000.0;
+
+ if (!(resamp_pvt->resampler = resample_open(RESAMPLER_QUALITY, resamp_pvt->resample_factor, resamp_pvt->resample_factor)))
return -1;
return 0;
@@ -73,9 +73,9 @@
{
struct slin8_to_slin16_pvt *resamp_pvt = pvt->pvt;
- resamp_pvt->resample_factor = 2.0;
-
- if (!(resamp_pvt->resampler = resample_open(RESAMPLER_QUALITY, 2.0, 2.0)))
+ resamp_pvt->resample_factor = 16000.0 / 8000.0;
+
+ if (!(resamp_pvt->resampler = resample_open(RESAMPLER_QUALITY, resamp_pvt->resample_factor, resamp_pvt->resample_factor)))
return -1;
return 0;
More information about the asterisk-commits
mailing list