Module: sems Branch: master Commit: bf801d4aefa238e378fd46ca21e44431bb7f09c9 URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sems/?a=commit;h=bf801d4aefa238e378fd46ca21e44431bb7f09c9
Author: Raphael Coeffic <[email protected]> Committer: Raphael Coeffic <[email protected]> Date: Mon Mar 5 11:54:20 2012 +0100 c/f: fixed resampler constants for 32bit compilers. thx to Juha for reporting. --- core/resample/resample.cpp | 16 ++++++++-------- 1 files changed, 8 insertions(+), 8 deletions(-) diff --git a/core/resample/resample.cpp b/core/resample/resample.cpp index 04de0f7..99554ee 100644 --- a/core/resample/resample.cpp +++ b/core/resample/resample.cpp @@ -226,7 +226,7 @@ int ResampleSincMono::resample(signed short *dst, float rate, unsigned num_sampl int done = 0; increment_fixed = (1.0/rate) * 4294967296.0; - current_fixed = (((unsigned long long)current<<32)&0xFFFFFFFF00000000) | (curfrc & 0xffffffff); + current_fixed = (((unsigned long long)current<<32)&0xFFFFFFFF00000000LL) | (curfrc & 0xffffffff); if(pad_samples) { if(num_samples < pad_samples) { @@ -304,7 +304,7 @@ int ResampleSincMono::resample(signed short *dst, float rate, unsigned num_sampl num_samples--; done++; } - current_fixed = (((unsigned long long)current<<32)&0xFFFFFFFF00000000); + current_fixed = (((unsigned long long)current<<32)&0xFFFFFFFF00000000LL); } this->current = (current_fixed>>32) & 0xffffffff; @@ -457,7 +457,7 @@ int ResampleSincStereo::resample(signed short *dst, float rate, unsigned num_sam int done = 0; increment_fixed = (1.0/rate) * 4294967296.0; - current_fixed = (((unsigned long long)current<<32)&0xFFFFFFFF00000000) | (curfrc & 0xffffffff); + current_fixed = (((unsigned long long)current<<32)&0xFFFFFFFF00000000LL) | (curfrc & 0xffffffff); if(pad_samples) { if(num_samples < pad_samples) { @@ -545,7 +545,7 @@ int ResampleSincStereo::resample(signed short *dst, float rate, unsigned num_sam num_samples--; done++; } - current_fixed = (((unsigned long long)current<<32)&0xFFFFFFFF00000000); + current_fixed = (((unsigned long long)current<<32)&0xFFFFFFFF00000000LL); } this->current = (current_fixed>>32) & 0xffffffff; @@ -589,7 +589,7 @@ int ResampleLinMono::resample(signed short *dst, float rate, unsigned num_sample int done = 0; increment_fixed = (1.0/rate) * 4294967296.0; - current_fixed = (((unsigned long long)current<<32)&0xFFFFFFFF00000000) | (curfrc & 0xffffffff); + current_fixed = (((unsigned long long)current<<32)&0xFFFFFFFF00000000LL) | (curfrc & 0xffffffff); if(pad_samples) { if(num_samples < pad_samples) { @@ -655,7 +655,7 @@ int ResampleLinMono::resample(signed short *dst, float rate, unsigned num_sample num_samples--; done++; } - current_fixed = (((unsigned long long)current<<32)&0xFFFFFFFF00000000); + current_fixed = (((unsigned long long)current<<32)&0xFFFFFFFF00000000LL); } this->current = (current_fixed>>32) & 0xffffffff; @@ -700,7 +700,7 @@ int ResampleLinStereo::resample(signed short *dst, float rate, unsigned num_samp int done = 0; increment_fixed = (1.0/rate) * 4294967296.0; - current_fixed = (((unsigned long long)current<<32)&0xFFFFFFFF00000000) | (curfrc & 0xffffffff); + current_fixed = (((unsigned long long)current<<32)&0xFFFFFFFF00000000LL) | (curfrc & 0xffffffff); if(pad_samples) { if(num_samples < pad_samples) { @@ -776,7 +776,7 @@ int ResampleLinStereo::resample(signed short *dst, float rate, unsigned num_samp num_samples--; done++; } - current_fixed = (((unsigned long long)current<<32)&0xFFFFFFFF00000000); + current_fixed = (((unsigned long long)current<<32)&0xFFFFFFFF00000000LL); } this->current = (current_fixed>>32) & 0xffffffff; _______________________________________________ Semsdev mailing list [email protected] http://lists.iptel.org/mailman/listinfo/semsdev
