xenia icon indicating copy to clipboard operation
xenia copied to clipboard

Audio can be significantly desynced from video in some titles

Open legend800 opened this issue 6 years ago • 16 comments

Audio (sfx & bgm) can be very delayed in some titles, even when the video is full speed on a high end machine. This can be upwards of 30 secs. in some cases.

Some examples: Peggle has audio delays of 10-15 secs Pac-Man Museum (Pac-Man CE game) has audio delays of 30-45 secs

These two games are literally perfect other than the audio delays (perf, gfx, etc.).

PC specifications: Windows 10 64-bit GeForce GTX 1080 i7-6700k @ 4.5 ghz 16GB RAM

legend800 avatar May 19 '18 16:05 legend800

Minecraft has this issue as well. Interestingly, the positional footstep sounds play based on where you were when the sound was supposed to play, causing it to sound like someone's walking behind you.

DrChat avatar May 19 '18 17:05 DrChat

Fable 2 Pub Games also suffers from noticeable audio lag, though in its case it's only about 2-4 seconds. Otherwise, it also runs perfectly!

Binarynova avatar Jul 25 '18 06:07 Binarynova

'Bully Scholarship Edition' has this issue too

Parovozik avatar Jul 25 '18 07:07 Parovozik

Please check if this has been fixed with the latest official build (which includes PR #1509).

JoelLinn avatar Dec 02 '19 00:12 JoelLinn

Issue still occurs today, however, delay only feels like around half a second. Detailed info in my bug report, https://github.com/xenia-project/xenia/issues/1806.

Encountered on desktop PC with Intel Core i7-4970k CPU, GTX 1080 Ti, 32 GB RAM, Windows 10 Pro Also encountered on laptop PC with Intel Core i7 i7-9700 (3.0-4.7 GHz 12 MB Smart Cache 6 cores), RTX 2070 Laptop version, 32 GB RAM, Winows 10 Pro

Encountered when playing in 5.1 surround (on a 7.1 home theater system, with Windows set to 7.1).

Confirmed in multiple titles: at least Bean, the Peggle series (cf. @legend800's comment in bug #1806), Halo 3. Web search indicates this is a title-agnostic issue, though. I've seen this mentioned very recently in YouTube comments and can find additional indications by googling it.

@dev team, please let me know if there's anything else I can do to test this issue. Will be more than happy to contribute to this fantastic project if I can.

mrmatteastwood avatar May 12 '21 06:05 mrmatteastwood

Just tried RDR1 with the latest xenia and xenia canary, with all the available APU audio options and want to verify: There is a constant ~0.5s delay on every audio content.

PC: CPU: i9-9900k Memory: 32GB RAM VGA: RTX2080Ti DAC: RME ADI-2 DAC fs OS: Win10Pro

The emulator and the game ran from SSD.

It looks like the audio stream/processing has this delay, because it is not changing with the framerate, does not affected by the "apu" change.

georgeczako avatar May 17 '21 18:05 georgeczako

interesting because I never had that with rdr, old nor new xma decoding code

JoelLinn avatar May 17 '21 18:05 JoelLinn

Lumines Live! has about half a second of audio lag with both sdl and xaudio2.

CPU: i7-9700k RAM: 32GB DDR4 3000 dual channel Mobo: PRIME Z370-A II DAC: integrated Realtek S1220A/Crystal Sound 3 line out to analog headphones GPU: GTX1660 OS: Windows 10 Pro 21H1

Azurfel avatar Jan 21 '22 21:01 Azurfel

Bad news.... I read in the FAQ that this is an issue that's highly unlikely to be addressed, because nobody is working on it.

https://github.com/xenia-project/xenia/wiki/FAQ#Why_is_the_audio_delayed

It's understandable, seeing this is an open-source project that people work on for free in their spare time. I'm very grateful it's happening at all and in awe of the work that has gone into this emulator.

Still, it's a shame. To me, this kind of audio delay is a dealbreaker, so no Xbox 360 emulation for me for now. I truly hope this will be addressed at some point in the future.

mrmatteastwood avatar Jan 22 '22 08:01 mrmatteastwood

As it turns out, there is already a setting in canary's config file that significantly improves this issue, at least for Lumines (max_queued_frames).

Azurfel avatar Jan 22 '22 21:01 Azurfel

Nice find, but it does not seem to impact games like Peggle - there's still like a 1 sec delay regardless of using 0, 64 or 256, etc.. Audio delay is a lot better than it used to be though. At least it's not 40s anymore. :)

legend800 avatar Jan 23 '22 00:01 legend800

It seems like every game has something .3-.5ish seconds of audio delay that can be reduced to almost nothing using max_queued_frames, but at least some games have additional audio issues beyond that.

(Also, try 3. 0 gives me no audio, and 1 or 2 distorts the audio, but 3 is clean on my system with less delay than 16.)

Azurfel avatar Jan 23 '22 01:01 Azurfel

Whoa, 3 is for sure the right value and should be the default over 64! Everything is perfectly sync now. Great find and great add by the devs!

legend800 avatar Jan 23 '22 01:01 legend800

I'm happy to report that setting a low max_queued_frames value in canary seems to fix audio lag for me too (at least so far). Thanks for the tip @Azurfel 👍. Gotta say this project never fails to amaze me.

mac512k avatar Jan 23 '22 02:01 mac512k

+1! Confirming that setting the value to 3 works for Bean and Halo 3. How awesome!!!

mrmatteastwood avatar Jan 24 '22 07:01 mrmatteastwood

Tried the max_queued_frames fix but did not work... Audio in Ninja Gaiden II still goes out of sync after a while.

afgks avatar Apr 29 '23 01:04 afgks