summaryrefslogtreecommitdiff
path: root/src/mixer.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2008-05-27 21:41:00 +0000
committerrubidium <rubidium@openttd.org>2008-05-27 21:41:00 +0000
commit5c5ee7eb579d0ee6655e0b81f6169dca7632ab97 (patch)
tree086ec523744482fc8374da46db2a402e4b5c5d0a /src/mixer.cpp
parent49a0bd7f90f3c48f81e9ad0bcabe87a77cf36e0f (diff)
downloadopenttd-5c5ee7eb579d0ee6655e0b81f6169dca7632ab97.tar.xz
(svn r13301) -Fix [FS#1997]: resolve more MSVC 9 x64 warnings.
Diffstat (limited to 'src/mixer.cpp')
-rw-r--r--src/mixer.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mixer.cpp b/src/mixer.cpp
index 3b6557cde..b4ea66994 100644
--- a/src/mixer.cpp
+++ b/src/mixer.cpp
@@ -104,7 +104,7 @@ MixerChannel *MxAllocateChannel()
return NULL;
}
-void MxSetChannelRawSrc(MixerChannel *mc, int8 *mem, uint size, uint rate, uint flags)
+void MxSetChannelRawSrc(MixerChannel *mc, int8 *mem, size_t size, uint rate, uint flags)
{
mc->memory = mem;
mc->flags = flags;
@@ -114,12 +114,12 @@ void MxSetChannelRawSrc(MixerChannel *mc, int8 *mem, uint size, uint rate, uint
mc->frac_speed = (rate << 16) / _play_rate;
/* adjust the magnitude to prevent overflow */
- while (size & 0xFFFF0000) {
+ while (size & ~0xFFFF) {
size >>= 1;
rate = (rate >> 1) + 1;
}
- mc->samples_left = size * _play_rate / rate;
+ mc->samples_left = (uint)size * _play_rate / rate;
}
void MxSetChannelVolume(MixerChannel *mc, uint left, uint right)