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

Replaced SoundFileReaderWav implementation with miniaudio (dr_)wav decoder #3019

Merged
merged 1 commit into from
May 17, 2024

Conversation

binary1248
Copy link
Member

Title.

Closes #1777.

If anyone is wondering why the writer wasn't also replaced, our current implementation supports writing in extensible format which supports embedding channel mapping data, whereas the miniaudio implementation doesn't as far as I can tell. The reasoning behind replacing the decoder (see #1777: slow, doesn't support exotic formats) also doesn't really apply to replacing the writer as well. If we ever get reports about performance issues with the writer it will be easy to optimize.

@coveralls
Copy link
Collaborator

Pull Request Test Coverage Report for Build 9121879561

Details

  • 64 of 106 (60.38%) changed or added relevant lines in 3 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.07%) to 55.392%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/SFML/Audio/MiniaudioUtils.cpp 6 26 23.08%
src/SFML/Audio/SoundFileReaderWav.cpp 56 78 71.79%
Totals Coverage Status
Change from base Build 9119260362: -0.07%
Covered Lines: 11417
Relevant Lines: 19421

💛 - Coveralls

@eXpl0it3r eXpl0it3r added this to the 3.0 milestone May 17, 2024
Copy link
Member

@eXpl0it3r eXpl0it3r left a comment

Choose a reason for hiding this comment

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

Tested it even with some surround audio that our implementation couldn't decode correctly.
Whether it's faster as the issue mentioned, I couldn't tell, but it's certainly less code for us to maintain. 😊

@eXpl0it3r eXpl0it3r merged commit 1a40f01 into master May 17, 2024
209 checks passed
@eXpl0it3r eXpl0it3r deleted the feature/miniaudio_wav branch May 17, 2024 14:32
@eXpl0it3r
Copy link
Member

Thank you for switch the decoder! 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Suggestion: Replace default wav decoder implementation with dr_wav
4 participants