Commit 4e54087f authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

dsound: Simplify f_to_32.

parent 92f9c58e
......@@ -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));
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment