Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Jak3] Adjust overlord SPU dma to avoid audio hangs #3804

Merged
merged 1 commit into from
Dec 14, 2024

Conversation

water111
Copy link
Collaborator

Change jak 3 SPU DMA to run the interrupt handler "immediately" (or at least before DMA_SendToSPUAndSync returns).

This fixes an issue where audio can hang during fast cutscene playback. I'm hoping it fixes more issues with looping/stuck audio as well, but this needs more testing.

I originally wanted to do it this way, but thought that it didn't work - from Jak 2 it seemed like things broke if the DMA was too fast. But, at least for Jak 3, everything seems to work like this. This will remove a huge source of non-deterministic timing in audio stuff and hopefully make things easier to debug. It also means that a large portion of streaming audio code will never have to run - from the game's point of view there's always the next SPU buffer available.

If this works well, I might revisit jak 2 as well.

@water111 water111 merged commit a3e8f0f into master Dec 14, 2024
12 checks passed
@water111 water111 deleted the w/j3-spu-dma-hacks branch December 14, 2024 17:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

1 participant