summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsmatz <smatz@openttd.org>2010-03-23 19:48:24 +0000
committersmatz <smatz@openttd.org>2010-03-23 19:48:24 +0000
commitfe35a0cacf9da67e11004391d224d63e9bf45145 (patch)
treee80882af08a271e69dec6298da3cd21720ffc933
parent6176e30d404d875c8bcb846ce5dd51f74039ded7 (diff)
downloadopenttd-fe35a0cacf9da67e11004391d224d63e9bf45145.tar.xz
(svn r19505) -Codechange: silence a gcc<4.2 warning
-rw-r--r--src/mixer.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mixer.cpp b/src/mixer.cpp
index 36c982bec..7742c55a1 100644
--- a/src/mixer.cpp
+++ b/src/mixer.cpp
@@ -196,8 +196,8 @@ void MxSetChannelVolume(MixerChannel *mc, uint volume, float pan)
{
/* Use sinusoidal pan to maintain overall sound power level regardless
* of position. */
- mc->volume_left = volume * sin((1.0 - pan) * M_PI / 2.0);
- mc->volume_right = volume * sin(pan * M_PI / 2.0);
+ mc->volume_left = (uint)(sin((1.0 - pan) * M_PI / 2.0) * volume);
+ mc->volume_right = (uint)(sin(pan * M_PI / 2.0) * volume);
}