mirror of https://github.com/odrling/Aegisub
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:
parent
090fdecb95
commit
935e5544d5
|
@ -775,7 +775,7 @@ int64_t DirectSoundPlayer2Thread::GetCurrentFrame()
|
||||||
|
|
||||||
if (!IsPlaying()) return 0;
|
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;
|
return start_frame + milliseconds_elapsed * provider->GetSampleRate() / 1000;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue