Skip to content
This repository was archived by the owner on Aug 31, 2021. It is now read-only.

Commit bb70387

Browse files
author
runrevali
committed
[[ Bug 13393 ]] Round playloudness to nearest integer rather than down
1 parent 1e07bc1 commit bb70387

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

docs/notes/bugfix-13393.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# playloudness should be rounded to nearest integer rather than down

engine/src/aclip.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -951,7 +951,8 @@ uint2 MCS_getplayloudness()
951951
#if defined FEATURE_PLATFORM_AUDIO
952952
double t_volume;
953953
MCPlatformGetSystemProperty(kMCPlatformSystemPropertyVolume, kMCPlatformPropertyTypeDouble, &t_volume);
954-
t_loudness = t_volume * 100.0;
954+
// AL-2014-09-10: [[ Bug 13393 ]] Add 0.5 so that loudness is rounded to nearest integer
955+
t_loudness = 100.0 * t_volume + 0.5;
955956
#elif defined _WINDOWS
956957
if (hwaveout == NULL)
957958
{

0 commit comments

Comments
 (0)