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:
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.
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.