Skip to content

Conversation

@Ziemas
Copy link
Contributor

@Ziemas Ziemas commented Nov 5, 2025

Description of Changes

This adds emulation of the voice decode buffers in the SPU. Each voice buffers around 12 samples which means the decoder runs ahead of the actual playback position, this is observable by reading the NAX register for the voice. It's particularly noticeable if you start a voice with 0 pitch as it will still move ahead until the buffer is filled.

Aside from that, we now also read and update the loop flags every audio frame. This fixes DQV (since the IRQ gets tested each time its read) and lets us remove a minor hack for the intro videos in Stolen.

Rationale behind Changes

More accurate.

Fixes #13486

Suggested Testing Steps

Idk, play stuff and make sure nothing sounds really bad.

Did you use AI to help find, test, or implement this issue or feature?

No.

Might as well If the saveversion is already being bumped.

[SAVEVERSION+]
This makes the timing of NAX advancing more similar to console since it
emulates the decode buffer behaviour of it rushing ahead of playback
until the buffer is full.

It also makes interpolation of the first four samples more correct by
using real data instead of the zero filled previous values.

[SAVEVERSION+]
@Heit0fff
Copy link

Heit0fff commented Nov 6, 2025

Someone should test #8286 (update: tested spyro, it still doesn't work well), #1634 and other sound issues.

@GitHub-Khi
Copy link

#1634 and other sound issues.

For Valkyrie Profile 2 - Silmeria, there seems to have been an unknown workaround for the desync for a longer time (at least in SLES-54646 in my case). I discovered this by chance when i used the corresponding pnach file from felixthecat1970 in this thread. One of this codes improves the playback of videos in the game, but there will be lags in the videos. EE Cycle Rate 180% helps to eliminate these lags, but this results in a minimal delay between video and sound, which is definitely acceptable.

What i am writing does not contribute to solving the issue, but i just wanted to mention it. Maybe these workarounds will soon be a thing of the past.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG]: Dragon Quest V missing BGM.

4 participants