From: Alex Henrie Subject: [PATCH] quartz: Don't round a <1sec difference to 0 in WAVEParserImpl_seek Message-Id: <20180923202226.10127-1-alexhenrie24@gmail.com> Date: Sun, 23 Sep 2018 14:22:26 -0600 Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=34302 Signed-off-by: Alex Henrie --- For some reason, the game sets the audio stream position to a negative value, then seeks to 0. If Wine decides that it doesn't actually need to do the seek operation, it then reads garbage data from the negative offset. Unfortunately, there is still another bug with the audio in this game: Wine keeps reading past the end of the audio stream, causing a crash at the end of the audio clip. --- dlls/quartz/waveparser.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/dlls/quartz/waveparser.c b/dlls/quartz/waveparser.c index fa9cd45d27..995e43196d 100644 --- a/dlls/quartz/waveparser.c +++ b/dlls/quartz/waveparser.c @@ -211,10 +211,9 @@ static HRESULT WINAPI WAVEParserImpl_seek(IMediaSeeking *iface) return E_INVALIDARG; } - if (curpos/1000000 == newpos/1000000) + if (curpos == newpos) { - TRACE("Requesting position %s same as current position %s\n", - wine_dbgstr_longlong(newpos), wine_dbgstr_longlong(curpos)); + TRACE("Requesting position %s same as current position\n", wine_dbgstr_longlong(newpos)); return S_OK; } -- 2.19.0