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

DSPHLE: Minor cleanup & savestate fix for AX coefficients. #10058

Merged
merged 4 commits into from Aug 30, 2021

Conversation

AdmiralCurtiss
Copy link
Contributor

Fixes audio breaking if you load a state while a non-AX ucode is running.

Source/Core/Core/HW/DSPHLE/UCodes/AX.cpp Outdated Show resolved Hide resolved
Source/Core/Core/HW/DSPHLE/UCodes/AX.cpp Outdated Show resolved Hide resolved
Copy link
Member

@leoetlino leoetlino left a comment

Choose a reason for hiding this comment

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

Reviewed 2 of 2 files at r1, 1 of 1 files at r2, 2 of 2 files at r3, 4 of 4 files at r4, all commit messages.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @AdmiralCurtiss)


Source/Core/Core/HW/DSPHLE/UCodes/AX.h, line 100 at r4 (raw file):

  // The coefficients aren't always available (they are part of the DSP DROM)
  // so we also need to know if they are valid or not.
  bool m_coeffs_available = false;

Thoughts on combining m_coeffs_available and m_coeffs_checksum into a std::optional m_coeffs_checksum? That would simplify the check in the savestate code and would make it impossible to forget checking or updating available/checksum.


Source/Core/Core/HW/DSPHLE/UCodes/AX.cpp, line 72 at r4 (raw file):

      continue;

    std::memcpy(m_coeffs.data(), raw_coeffs.data(), raw_coeffs_size);

#include <cstring>

Copy link
Member

@leoetlino leoetlino left a comment

Choose a reason for hiding this comment

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

Reviewed 3 of 3 files at r5, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @AdmiralCurtiss)

@leoetlino leoetlino merged commit 1fa74ab into dolphin-emu:master Aug 30, 2021
11 checks passed
@AdmiralCurtiss AdmiralCurtiss deleted the dsp-cleanup branch August 30, 2021 22:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants