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

Core/DSPHLE: Move AESndAccelerator instance into AESndUCode. #12486

Merged
merged 1 commit into from Jan 8, 2024

Conversation

AdmiralCurtiss
Copy link
Contributor

This changes the AESndAccelerator instance from global state to state local to each AESndUCode instance. I'm not sure whether this has side-effects (is this state intendend to persist across unload and reload of an UCode?), so this may need a different approach if it does.

Untested.

Copy link
Contributor

@Pokechu22 Pokechu22 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can confirm that the modplay.elf homebrew example (which uses aesnd) works properly with this change.

is this state intendend to persist across unload and reload of an UCode

It probably works that way in practice on real hardware (unless aesnd happens to fully reinitialize it in all cases), but this wasn't something I was trying to model. I just implemented it that way because I was copying what was done in AXVoice.h:

static std::unique_ptr<Accelerator> s_accelerator = std::make_unique<HLEAccelerator>();

(which I see you've changed in #12487).

@lioncash lioncash merged commit 180d053 into dolphin-emu:master Jan 8, 2024
11 checks passed
@AdmiralCurtiss AdmiralCurtiss deleted the globals-aesndaccel branch January 8, 2024 03:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants