Fix intermediate overflow in DirectSoundPlayer2 that resulted in the playback position resetting to the beginning after 97 seconds with 44.1 khz audio

Originally committed to SVN as r6170.
This commit is contained in:
Thomas Goyne 2011-12-27 01:38:14 +00:00
parent 090fdecb95
commit 935e5544d5

View file

@ -775,7 +775,7 @@ int64_t DirectSoundPlayer2Thread::GetCurrentFrame()
if (!IsPlaying()) return 0;
DWORD milliseconds_elapsed = GetTickCount() - last_playback_restart;
int64_t milliseconds_elapsed = GetTickCount() - last_playback_restart;
return start_frame + milliseconds_elapsed * provider->GetSampleRate() / 1000;
}