Skip to content

Conversation

@rexim
Copy link
Contributor

@rexim rexim commented Jun 12, 2024

If you enable SUPPORT_FILEFORMAT_FLAC some FLAC files don't play correctly. Specifically with sample size 24 bits. Here is a small example to reproduce the bug flac_bug.zip. The song sounds choppy.

I looked around the source code and found that WAV hardcodes the conversion of 24 bits samples to 16 bits ones. So I applied the same approach to FLAC and it seems to fix the issue. Submitting it as a PR in case it's useful for anybody else.

Please let me know if this is not the right way to do that.

Similarly to how it's done for WAV format, by forcing the conversion
to s16 on UpdateMusicStream().
@raysan5 raysan5 merged commit 33c5981 into raysan5:master Jun 12, 2024
@raysan5
Copy link
Owner

raysan5 commented Jun 12, 2024

Hi @rexim! Thanks for the review! Actually, I didn't remember that LoadAudioStream() supported that conversion!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants