From ac8dbd7a56e4ca0ccfbef61b89bdb55775abea6a Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Thu, 3 May 2018 21:43:53 -0700 Subject: Add a specific function for truncating float-to-int conversions --- OpenAL32/Include/alMain.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'OpenAL32/Include/alMain.h') diff --git a/OpenAL32/Include/alMain.h b/OpenAL32/Include/alMain.h index 78dd01c5..1cf1e5e2 100644 --- a/OpenAL32/Include/alMain.h +++ b/OpenAL32/Include/alMain.h @@ -260,6 +260,13 @@ inline ALint fastf2i(ALfloat f) #endif } +/* Converts float-to-int using standard behavior (truncation). */ +inline int float2int(float f) +{ + /* TODO: Make a more efficient method for x87. */ + return (ALint)f; +} + enum DevProbe { ALL_DEVICE_PROBE, -- cgit v1.2.3