PCSX2 / pcsx2

PCSX2 - The Playstation 2 Emulator
https://pcsx2.net
GNU General Public License v3.0
11.31k stars 1.58k forks source link

beatmania IIDX 16 - unusual delay between backing track and key audio #2977

Closed lain-2p closed 1 year ago

lain-2p commented 5 years ago

PCSX2 version: v1.5.0-dev-3135

Adjusted various EE/VU settings to no avail, and none of the speed hacks seem to impact it either.

Internal resolution/deinterlacing method did not seem to impact the problem, nor did fullscreen/windowed or using OpenGL (however OpenGL HW seems to suffer from a seperate frame pacing issue every 10 seconds or so, which is why I am opting to use DX11)

The in-game display offset function does not make up for this issue, as it equally offsets the already out of sync key and backing audio.

Tried multiple settings in SPU2-X, also to no avail.

PCSX2 options: Preset 2 (safe), speedhacks enabled, VSync on, aspect 4:3

Plugins used: GSdx 1.1.0 SSE4 DirectX11 HW, bob tff deinterlace everything else default

Description of the issue: Once in a song, there is a set backing track, on top of which the key samples play to form the whole song. Currently in the emulator, this backing track is roughly one beat off from where it should be, as if it started playing ever so slightly late. Unlike the issue with the non interlaced IIDX games, the speed at which the tracks play or the delay between the two doesn't seem to change.

This may be hard to demonstrate to someone not familiar with the series, as the issue is somewhat subtle if you aren't able to play along to the beat, but if needed I can try to demonstrate the problem in a video.

How to reproduce the issue: Boot the game up, select your controller and default name, go in to FREE mode, and play Quasar in the Alphabetical folder Q. Try to line up your input to the backing track independent of the note crossing over the red line. if replicated, it will show as POOR or GOOD (and generally be audibly wrong). The input for the first key in Quasar (1) is the square face button (quasar was chosen as the first few notes are simple and distinct)

Last known version to work: Others have seemingly had more success in the past, but I don't know the details of their PCSX2 setups. https://youtu.be/sPCEMPIC2xE for example

PC specifications: Intel i5 4670k @4.2GHz, AMD Radeon R9 290, 12GB 1600MHz DDR3 RAM, SSD, Windows 10

tjbautista01 commented 2 years ago

oh it seems i might have misunderstood.

but on the display latency thing, it seems switching from d3d11 to opengl drastically improved the timing (can actually hit notes on the line and get a flashing great). to confirm i played the same song and chart in both iidx 5th style and iidx empress (sync LIGHT7) and also switched renderers, not changing any timing offset options in the latter.

the 10ms audio latency isn't too bothersome but to keep timing consistent i listen to my keypresses

confirmed again with a song I can consistently AAA on empress. tried with vsync on and off but mtgs queue still at 0. timing is still ok but it seems i got better results with vsync on. either way it seems opengl might be the better renderer of choice for these games.

vulkan is def a no-no. with vsync on display latency is more horrible than d3d11 and vsync off it performs just about as good (bad?) as d3d11 with vsync off.

so display lag's crossed out now. which means the answer to the original problem was definitely audio latency. it's improved now using cubeb and wasapi if on windows but yeah 10ms is still kinda iffy

another thing, tests were done using a usb iidx controller. using the ps2 iidx controller plugged in via a usb adapter will definitely introduce input lag.

Prism019 commented 1 year ago

It's finally playable for me (on parity with the PS2), albeit having to modify the PCSX2 source to allow me to set the Audio Output Latency to "0 ms (avg)".

image

This doesn't seem to be an issue at all, considering Cubeb reports a 40μs minimum buffer on my system with the jack backend.

[  255.4613] Opening SPU2...
[  255.4625] Initializing SndBuffer at sample rate of 48000...
[  255.4733] (Cubeb) Using normal 2 speaker stereo output.
[  255.4733] (Cubeb) Minimum latency: 0.04 ms (2 audio frames)

The only time there's any noticeable crackling is when my GPU starts to struggle rendering any visuals, which is only during menuing and is expected with the settings I have selected.

hoholee12 commented 1 year ago

just my 2 cents, 10ms audio latency is pretty good enough.. although video lag is still an issue.

stenzek commented 1 year ago

There's no issues with "video lag". At most, pcsx2 is adding less than one frame of video latency (due to the previous frame's buffer getting scanned out at vblank start time). That meme's been untrue for some time, if you still have input delays, it's because of other stuff (e.g. compositors, so use exclusive fullscreen, etc).

hoholee12 commented 1 year ago

There's no issues with "video lag". At most, pcsx2 is adding less than one frame of video latency (due to the previous frame's buffer getting scanned out at vblank start time). That meme's been untrue for some time, if you still have input delays, it's because of other stuff (e.g. compositors, so use exclusive fullscreen, etc).

yup. exclusive fullscreen def fixed it. thanks man 👍

refractionpcsx2 commented 1 year ago

Okay well this issue is done, the original problem is fixed, and the rest of the thread is people falling over themselves trying to sort out their own issues.