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
AX: fix missing ramp of main surround channel #10643
Conversation
662d8ea
to
6967603
Compare
| { | ||
| ret |= MIX_L_RAMP | MIX_R_RAMP; | ||
| if (ret & MIX_AUXA_L) | ||
| ret |= MIX_AUXA_L_RAMP | MIX_AUXA_R_RAMP; | ||
| if (ret & MIX_AUXB_L) | ||
| ret |= MIX_AUXB_L_RAMP | MIX_AUXB_R_RAMP; | ||
| if (ret & MIX_AUXA_S) | ||
| ret |= MIX_AUXA_S_RAMP; | ||
| if (ret & MIX_AUXB_S) | ||
| ret |= MIX_AUXB_S_RAMP; | ||
| } | ||
| ret |= MIX_ALL_RAMPS; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Am I correct in guessing that the intended change here is equivalent to adding | MIX_MAIN_S_RAMP to the first line, like it's done below if m_crc is not 0x4e8a8b21?
If so this consolidation seems wrong to me, but I'm not familiar with the DSP so I could be missing context. For example, if the 0x8 bit of mixer_control is set and the lowest three bits are not then in the old code none of these ifs are true leaving ret == 0xf, while in this version it becomes 0xAAAAAF.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Make sure to look at the two commits individually.
- Yes, setting all ramp flags changes the value of
ret. However, a ramp flag has no effect if its corresponding channel is not active. See theMIX_ONchecks in AXVoice.h that precede each use ofRAMP_ON.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't have any GameCube games to test with, but the code LGTM.
Also more renaming. Not sure if fixing the ramp makes a noticeable difference anywhere.