-
-
Notifications
You must be signed in to change notification settings - Fork 21.3k
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 MP3 import and playback support #43007
Conversation
EDIT: Minimp3 uses variable shadowing, which needs to be specifically allowed through a compiler flag when compiling for Linux. I'm not sure if that's a good idea, but it seems to be working. |
585fe0a
to
18f811c
Compare
18f811c
to
74fabbf
Compare
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.
Looks pretty good to me, just some nitpicks, and a rebase is necessary as some core headers were moved recently in the master
branch (so you'll have to propagate this in your own includes).
modules/minimp3/SCsub
Outdated
|
||
# Godot's own source files | ||
env_minimp3.add_source_files(env.modules_sources, "*.cpp") | ||
env_minimp3.disable_warnings() |
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.
The warnings should only be disabled for thirdparty code, not for Godot files.
Here the thirdparty code is only headers so it's a bit tricky. I'd suggest trying without disabling warnings, and if some warnings are raised in the headers, then we'll have to use -isystem
to include them to the include path.
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.
Okay, I wasn't sure about that one. I changed it to use -isystem
now.
dc4ef11
to
8e6d6c7
Compare
8e6d6c7
to
704d6de
Compare
Thanks! And congrats for your first merged Godot contribution 🎉 If you want to prepare a backport of this feature to the |
Support for MP3 audio streams, using the minimp3 decoder. Adresses this feature proposal: godotengine/godot-proposals#85
Tested to be working with mono, stereo, and joint stereo encoded files.
Tested and working on both Windows and Linux.