summaryrefslogtreecommitdiff
path: root/src/music
diff options
context:
space:
mode:
authorglx22 <glx22@users.noreply.github.com>2019-03-28 00:09:33 +0100
committerGitHub <noreply@github.com>2019-03-28 00:09:33 +0100
commit66dd7c3879123bb99b712375b66b577f81d53a96 (patch)
tree6231635658dab5ba63b776e9350884c083617cb1 /src/music
parente817951bfdc229b404d5fec188c67f5202a0e774 (diff)
downloadopenttd-66dd7c3879123bb99b712375b66b577f81d53a96.tar.xz
Fix: MSVC warnings (#7423)
Diffstat (limited to 'src/music')
-rw-r--r--src/music/win32_m.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/music/win32_m.cpp b/src/music/win32_m.cpp
index 18a3bce3e..bdba202f2 100644
--- a/src/music/win32_m.cpp
+++ b/src/music/win32_m.cpp
@@ -42,7 +42,7 @@ static struct {
MidiFile current_file; ///< file currently being played from
PlaybackSegment current_segment; ///< segment info for current playback
- DWORD playback_start_time; ///< timestamp current file began playback
+ size_t playback_start_time; ///< timestamp current file began playback
size_t current_block; ///< next block index to send
MidiFile next_file; ///< upcoming file to play
PlaybackSegment next_segment; ///< segment info for upcoming file
@@ -184,7 +184,7 @@ void CALLBACK TimerCallback(UINT uTimerID, UINT, DWORD_PTR dwUser, DWORD_PTR, DW
/* find first block after start time and pretend playback started earlier
* this is to allow all blocks prior to the actual start to still affect playback,
* as they may contain important controller and program changes */
- uint preload_bytes = 0;
+ size_t preload_bytes = 0;
for (size_t bl = 0; bl < _midi.current_file.blocks.size(); bl++) {
MidiFile::DataBlock &block = _midi.current_file.blocks[bl];
preload_bytes += block.data.size();
@@ -210,7 +210,7 @@ void CALLBACK TimerCallback(UINT uTimerID, UINT, DWORD_PTR dwUser, DWORD_PTR, DW
/* play pending blocks */
DWORD current_time = timeGetTime();
- DWORD playback_time = current_time - _midi.playback_start_time;
+ size_t playback_time = current_time - _midi.playback_start_time;
while (_midi.current_block < _midi.current_file.blocks.size()) {
MidiFile::DataBlock &block = _midi.current_file.blocks[_midi.current_block];