Project

General

Profile

Actions

Emulator Issues #6199

closed

Audio Lags behind Visuals in Dolphin

Added by hookyboysb about 11 years ago.

Status:
Fixed
Priority:
Normal
Assignee:
Category:
DSPLLE
% Done:

0%

Operating system:
N/A
Issue type:
Bug
Milestone:
Regression:
No
Relates to usability:
No
Relates to performance:
No
Easy:
No
Relates to maintainability:
No
Regression start:
Fixed in:

Description

Have you searched the issue tracker for a similar issue? Yes

Game Name? No specific game, but tested with Dance Dance Revolution II and Wind Waker

Game ID? SUREA-4, GZLE01

What went wrong? Audio is not synced well. It is as much as a quarter-second off with LLE. In the new AX HLE build, it acts the same way.

What did you expect to happen? I expected the audio to be near-perfect.

What steps will reproduce the problem? Use LLE and play any game. If the character moves prior to a sound being made, then that's the problem. Playing any rhythm-based game (like DDR) exacerbates the problem.

What version of Dolphin were you using? 3.5-1088

64 or 32 bit Dolphin? 64 bit

What version of Dolphin used to work? Don't think there is one

What Operating System were you using and what are your hardware
specifications? CPU: Intel i5 Ivy Bridge 3570K (clocked at 3.4 GHz)
RAM: G.SKILL Sniper Series 8GB (2 x 4GB) DDR3 1866 RAM
Motherboard: ASRock Z77 Extreme4
Video Card: HIS H687F1G2M Radeon HD 6870
SSD: OCZ Agility 3 120GB
HDD: Maxtor 320GB
OS: Windows 7

64 or 32 bit Operating system? 64 bit

Any other relevant information or links to logs: The old AX HLE code (currently in the master branch) has drifting audio in DDRII.

Actions #1

Updated by MayImilae about 11 years ago

New-AX-HLE was changing constantly over the past few days, and was just merged. Get the latest development version and try that.

Actions #2

Updated by daxtsu about 11 years ago

I jumped the gun a bit on that. I think it's because of the OpenAL backend. Try changing audio back ends to XAudio maybe. I was having sync issues until I moved back to XAudio.

Actions #3

Updated by hookyboysb about 11 years ago

Using DSound produces the same problem. Don't think I tried XAudio though... But I did, and while it is better (acceptable for most games), it's still noticeable in DDR. So I'm guessing any fix would come to XAudio first. Maybe it should be made the default, because I believe DSound is currently.

The latest dev version sadly did not resolve the issue. There seem to have been no changes. Maybe there's something wrong with the audio output that delays it?

Actions #4

Updated by JMC4789 about 11 years ago

Wind Waker doesn't use New-AX-HLE, so that hasn't been affected. Dunno about the other game, though.

Actions #5

Updated by pauldacheez about 11 years ago

JMC4789: Any game that's not a Nintendo game almost inevitably uses AX or AXWii. If not, it's a crazy custom µcode we haven't seen before and therefore it requires LLE.

Audio latency is kinda inevitable in an emulator like this. There's ways to reduce it (e.g. better lower-level audio APIs, more optimized code, possibly optionally disabling timestretching once Billiard puts it in every backend), but some sources of latency may be unavoidable. There's a lot of room for improvement here, though, so don't fret.

Actions #6

Updated by hookyboysb about 11 years ago

Audio also seems to drift over time. This is more apparent in older revisions with the old AX HLE code (in HLE mode).

Actions #7

Updated by hookyboysb about 11 years ago

Kinda disappointing to find that out, but at least there's still hope.

Here's an idea: maybe the video can be delayed, and by some behind-the-scenes (well, I guess it's very much in-front-of-the-scenes with an open-source project) magic the input works properly too, then this can be fixed more easily. Of course, that's a pretty hackish solution and probably should only be used as a temporary fix.

Actions #8

Updated by Billiard26 about 11 years ago

  • Issue type set to Bug
Actions #9

Updated by bastos.eder about 11 years ago

Have to +1 this, this is definitely the case. Probably the most reliable way to test this, if you have any sort of rhythmic capability, is to load up Rhythm Heaven Fever. First thing that happens on a new save file is the game tests your rhythmic skill by seeing how accurately you can push the button to a beat. It visually displays how late you are:

http://imgur.com/FQ5Dy9F

Ideally in that screenshot the orange dots would be as close to the light line at the center as possible. I've played and taught drums for about 13 years, and do not have systemic difficulty keeping a straight quarter note beat, but the delay is long enough that if I play with what's coming out my speakers, it doesnt even show most of the marks.

In order to get it to register correctly, I have to press the button somewhere between 1/3 and 1/2 of a beat early. The tempo is approximately 112 beats per minute, meaning that beats are approximately 500ms apart. (If my math is right, I feel like it is wrong though - 112/60 = 1.86 bps; 1/1.86 = .535 sec per beat) That would imply the delay is on the order of 200-300 ms, which is very significant.

The last version of dolphin I used that did not have this lag was before the new AX HLE branch was merged, so its probably a safe assumption it has to do with that. (but, rhythm heaven was close to unplayable)

I understand that an emulator will always be inaccurate, but prior to the merge, I would be able to get pretty consistently close to the center line. Same hardware too, so I doubt that has any effect, but for the record I'm on a Windows 8 x64 with Intel HDA.

Actions #10

Updated by MayImilae over 10 years ago

  • Category changed from dsplle to dsphle
Actions #11

Updated by JMC4789 over 10 years ago

This literally happens in every game for me.

Actions #12

Updated by SeriousAce2k4 over 10 years ago

Ive got the same type of delay in Xenoblade Chronicles.

You can feel a delay by switching throgh the menues.

It wasnt there in every build before 3.5-1154 with the new ax hle 2.

Actions #13

Updated by idan345 over 10 years ago

The delay exists in Super Paper Mario wii.
When I jump , the jump sound comes like half a sec after the actual jump.
when landing it happens aswell. the landing sound is half a second off.

Actions #14

Updated by JMC4789 over 10 years ago

Assuming you're in windows, try using the xaudio2 back-end rather than dsound or openal. It may not be perfect, but it should be better.

Actions #15

Updated by JMC4789 over 10 years ago

  • Status changed from New to Accepted
Actions #16

Updated by damianesteves over 10 years ago

I encountered this issue as well while playing the Taiko no Tatsujin series (also a rhythm game, so it's more apparent).

I tried xaudio2, openal, and dsound with permutations of HLE and LLE audio and it still occurred. I also tried limiting the framerate to audio to see if that would help, but no luck.

Using 64-bit Dolhin 4.0.2 on Windows 7 64-bit.

Actions #17

Updated by R.Johns474 about 10 years ago

This remains Dolphin's biggest issue, in my opinion. I try not to mention it too often because I don't want to seem pushy, but I really wish it was a higher priority.

Actions #19

Updated by degasus about 10 years ago

  • Status changed from Work started to Fixed

Now the audio lag should be about 40 ms (plus the audio backend latency):
fixed by revision cbe7656b2ffd669fbaa5e4b0c709e29250f98573

Actions #20

Updated by webmaster about 10 years ago

Happening in Linux 64bit using either alsa or openal.

Actions #21

Updated by JMC4789 about 10 years ago

OpenAL will always have more lag than any other backend because of its timestretch features. Alsa, I don't know, but I was unable to reproduce it on my end. It sounds like whatever issues you are having are your own problems, or a game specific problem. Unfortunately, you left no information at all that would be useful.

Actions #22

Updated by bastos.eder almost 10 years ago

Hey guys, sorry for the delayed feedback, but I just tried out Rhythm Heaven Fever for the first time since the latency fix was merged. It plays really well, there may even be less latency now than on my real Wii (which is hooked up to a receiver + HDTV). Great stuff guys, lots of awesome progress being made on the audio front.

Actions #23

Updated by JMC4789 almost 10 years ago

Thank you for your feedback, glad your issue was fixed :)

Actions

Also available in: Atom PDF