Urban Runner: Odd Bug

General chat related to ScummVM, adventure gaming, and so on.

Moderator: ScummVM Team

Post Reply
h3xx
Posts: 14
Joined: Wed May 24, 2006 6:08 pm

Urban Runner: Odd Bug

Post by h3xx »

I didn't want to report it as a bug, because what's complete of the engine so far runs fine, but if you send a SIGSTOP to scummvm while the Urban Runner intro video is playing, and then restart it by sending it a SIGCONT, the video moves very quickly and the sound keeps going at the same pace.

It's just odd, that's all.
User avatar
DrMcCoy
ScummVM Developer
Posts: 595
Joined: Sat Dec 17, 2005 1:33 pm
Location: Braunschweig, Germany
Contact:

Re: Urban Runner: Odd Bug

Post by DrMcCoy »

Nope, it's not odd at all. To keep audio and video in sync, the player memorizes the start time, calculates the lag with (currentTime - startTime) - (currentFrame * frameTime) and resyncs by changing (or completely dropping, if necessary) the wait time at each frame.
So if you send a SIGSTOP, no further frame is processed and as soon as you send a SIGSTOP, the player thinks it fell completely behind.

Yes, there's a way to fix the apparently odd behaviour, by using AppandableAudioStream::getTotalPlayTime()... I'll fix that when I get around it ;)
User avatar
DrMcCoy
ScummVM Developer
Posts: 595
Joined: Sat Dec 17, 2005 1:33 pm
Location: Braunschweig, Germany
Contact:

Re: Urban Runner: Odd Bug

Post by DrMcCoy »

DrMcCoy wrote:Yes, there's a way to fix the apparently odd behaviour, by using AppandableAudioStream::getTotalPlayTime()... I'll fix that when I get around it ;)
There, should be fixed :)
h3xx
Posts: 14
Joined: Wed May 24, 2006 6:08 pm

Post by h3xx »

Thank you for the quick and verbose reply. And for taking the time to fix it. Now that the bug is fixed, I recommend that this topic be closed.
Post Reply