dk.ryoji
04-18-2010, 12:56 AM
(03-04-2010, 07:48 PM)xat Wrote: [ -> ]I traced one of the audio / video sync problems to r4830 (http://code.google.com/p/dolphin-emu/sou...ail?r=4830).
The "loosening" of the frame limiter caused the video to go ahead of the audio during pretty much any dialogue/cutscene/movie.
So the fix is just to revert this part of the revision in Core/Core.cpp:
Code:// Make the limiter a bit loose
u32 frametime = DrawnVideo * 1000 / ++TargetVPS;
while ((u32)Timer.GetTimeDifference() < frametime)
Common::YieldCPU();
//Common::SleepCurrentThread(1);
}
// Update info per second
u32 ElapseTime = (u32)Timer.GetTimeDifference();
if (ElapseTime >= 1000)
{
SCoreStartupParameter& _CoreParameter = SConfig::GetInstance().m_LocalCoreStartupParameter;
u32 FPS = Common::AtomicLoad(DrawnFrame) * 1000 / ElapseTime;
u32 VPS = --DrawnVideo * 1000 / ElapseTime;
The lines of interest:
u32 frametime = DrawnVideo * 1000 / [color=red]++[/color]TargetVPS;
u32 VPS = [color=red]--[/color]DrawnVideo * 1000 / ElapseTime;
Delete the parts in red. Video and audio in sync again! Yay.
This doesn't fix the inexplicable slowdown during the intro (where the game runs at about 85% for no real reason) - that seems to be something else entirely. For what it's worth, I don't experience that particular slowdown anymore ever since using the x64 build + regular JIT, but I do experience it using JITIL.
I have problem compile dolphin with VB 2008, could someone plz fix it (read above), then compile and upload dolphin (64-bit). I don't want to play this game until the audio / video sync problems fixed.