1
0
Fork 0
mirror of synced 2025-03-07 03:53:26 +01:00

dsound: Simplify f_to_32.

This commit is contained in:
Jacek Caban 2023-12-09 11:33:36 +01:00 committed by Alexandre Julliard
parent 92f9c58e6d
commit 4e54087fab

View file

@ -142,7 +142,7 @@ static inline LONG f_to_32(float value)
{
if(value <= -1.f)
return 0x80000000;
if(value >= 1.f * 0x7FFFFFFF / 0x80000000U) /* this rounds to 1.f */
if(value >= 1.f)
return 0x7FFFFFFF;
return le32(lrintf(value * 0x80000000U));
}