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

Add FLAC support without changing raylib source code #95

Merged
merged 2 commits into from
Mar 1, 2024
Merged

Add FLAC support without changing raylib source code #95

merged 2 commits into from
Mar 1, 2024

Conversation

jgabaut
Copy link
Contributor

@jgabaut jgabaut commented Feb 29, 2024

These changes should build raylib with -DSUPPORT_FILEFORMAT_FLAC=1.

This enables FLAC support as mentioned in #78.

I tested both TARGET_LINUX and TARGET_WIN64_MINGW and a sample FLAC file just works on both.

Notes:

  • Maybe the flag could be passed only to the raudio.c module build step. But I don't know if that definition changes anything else and may be needed for all modules anyway.

  • Maybe this could be done in a different way. I didn't want to assume too much and insert unrequested complexity, so a little more thought could shape this support introduction better than this bare minimum idea.

  • I don't think an additional configure option for the repo's build is needed (in order to have this be flexible/optional).

    • For now, the available configure options (hotreloading, bundled come to mind) seem fare more relevant than what this would offer.
  • I guess it mostly comes down to the downsides of turning this support on.

    • Don't know much about that, but may need to be looked into.
    • For now I can say that on my system the binary size increased:
      • from 5174kB to 5548kB, so ~7% (on TARGET_LINUX)
      • from 5723kB to 6085kB, so ~6% (on TARGET_WIN64_MINGW)

@jgabaut jgabaut mentioned this pull request Feb 29, 2024
@rexim
Copy link
Member

rexim commented Mar 1, 2024

Looks alright! Thank you!

@rexim rexim merged commit 1d7481b into tsoding:master Mar 1, 2024
4 checks passed
@jgabaut jgabaut deleted the work/support-flac branch March 1, 2024 22:41
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