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

Fix ESS mixer volume handling #3705

Merged
merged 7 commits into from
May 27, 2024
Merged

Fix ESS mixer volume handling #3705

merged 7 commits into from
May 27, 2024

Conversation

johnnovak
Copy link
Member

@johnnovak johnnovak commented May 27, 2024

Description

Fixes issue reported in #3700 (comment).

86box seems to have a more correct ESS mixer implementation, although it's unclear whether that's accurate to the real hardware or they just guessed the values.

https://github.com/86Box/86Box/blob/e61c6205584e4414fc4a64494be5c6f1aab3e6ff/src/sound/snd_sb.c#L93

In any case, reconciling the ESS and SB-specific mixer volume handling would take some non-trivial effort, and I'm not going to complicate our Sound Blaster code with that for the sake of a single 2024 demo. All in all, it's a rather insignificant detail to get the volume curve exactly right.

Manual testing

Now you can set the audio volume with the + and - keys in koolnESS: https://www.pouet.net/prod.php?which=96920

Checklist

Please tick the items as you have addressed them. Don't remove items; leave the ones that are not applicable unchecked.

I have:

  • followed the project's contributing guidelines and code of conduct.
  • performed a self-review of my code.
  • commented on the particularly hard-to-understand areas of my code.
  • split my work into well-defined, bisectable commits, and I named my commits well.
  • applied the appropriate labels (bug, enhancement, refactoring, documentation, etc.)
  • checked that all my commits can be built.
  • confirmed that my code does not cause performance regressions (e.g., by running the Quake benchmark).
  • added unit tests where applicable to prove the correctness of my code and to avoid future regressions.
  • made corresponding changes to the documentation or the website according to the documentation guidelines.
  • locally verified my website or documentation changes.

0x34 was used by mistake; now it's the correct 0x36 value.
@johnnovak johnnovak force-pushed the jn/fix-ess-fm-vol-1 branch 2 times, most recently from 2ee3aab to f71a330 Compare May 27, 2024 08:57
@johnnovak johnnovak self-assigned this May 27, 2024
@johnnovak johnnovak added audio Audio related issues or enhancements bug Something isn't working enhancement New feature or enhancement of existing features labels May 27, 2024
@johnnovak johnnovak marked this pull request as ready for review May 27, 2024 09:31
Copy link
Collaborator

@weirddan455 weirddan455 left a comment

Choose a reason for hiding this comment

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

So one small correction in the first commit and the rest are refactors. Looks good.

@johnnovak
Copy link
Member Author

So one small correction in the first commit and the rest are refactors. Looks good.

Yep, that's it! Thanks, man! 🎉

@johnnovak johnnovak merged commit 28a8948 into main May 27, 2024
32 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
audio Audio related issues or enhancements bug Something isn't working enhancement New feature or enhancement of existing features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants