mirror of
https://gitee.com/openharmony/third_party_libsnd
synced 2025-02-06 10:48:57 +00:00
src/double64.c : Fix clipping of double to short conversions on 64 bit systems.
This commit is contained in:
parent
7c1e46a2bb
commit
b05c4a46aa
@ -1,3 +1,8 @@
|
||||
2007-04-16 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||
|
||||
* src/double64.c
|
||||
Fix clipping of double to short conversions on 64 bit systems.
|
||||
|
||||
2007-04-15 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||
|
||||
* src/wav.c src/wav_w64.c
|
||||
|
@ -493,7 +493,7 @@ d2s_clip_array (const double *src, int count, short *dest, double scale)
|
||||
|
||||
if (CPU_CLIPS_POSITIVE == 0 && tmp > 32767.0)
|
||||
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 ;
|
||||
else
|
||||
dest [count] = lrint (tmp) ;
|
||||
|
Loading…
x
Reference in New Issue
Block a user