src/float32.c : Fix f2s_clip_array.

This commit is contained in:
Erik de Castro Lopo 2009-03-25 18:22:03 +11:00
parent 12a46a4785
commit 968ca73052
2 changed files with 6 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2009-03-25 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
* src/float32.c
Fix f2s_clip_array.
2009-03-24 Erik de Castro Lopo <erikd AT mega-nerd DOT com> 2009-03-24 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
* src/float32.c * src/float32.c

View File

@ -444,7 +444,7 @@ f2s_clip_array (const float *src, int count, short *dest, float scale)
if (CPU_CLIPS_POSITIVE == 0 && tmp > 32767.0) if (CPU_CLIPS_POSITIVE == 0 && tmp > 32767.0)
dest [count] = SHRT_MAX ; dest [count] = SHRT_MAX ;
else if (CPU_CLIPS_NEGATIVE == 0 && tmp < 32768.0) else if (CPU_CLIPS_NEGATIVE == 0 && tmp < -32768.0)
dest [count] = SHRT_MIN ; dest [count] = SHRT_MIN ;
else else
dest [count] = lrintf (tmp) ; dest [count] = lrintf (tmp) ;