mirror of
https://gitee.com/openharmony/third_party_libsnd
synced 2024-11-23 09:59:54 +00:00
src/float32.c : Fix f2s_clip_array.
This commit is contained in:
parent
12a46a4785
commit
968ca73052
@ -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
|
||||||
|
@ -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) ;
|
||||||
|
Loading…
Reference in New Issue
Block a user