-
Couldn't load subscription status.
- Fork 3.4k
Add multi-threading variants to sdl2_mixer #23094
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
Conversation
|
Seems reasonable to me. Does SDL2_mixer actually need thread support? |
|
Should fix some dependency issues discussed here: #23093 To summerize:
So It might be a dependency problem because mixer depends on another SDL2 version (-mt) then the other SDL2 libs and would differ from the SDL2 lib that is used when -pthread is enabled. |
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.
lgtm
tested and fix works
tools/ports/sdl2_mixer.py
Outdated
| 'sdl2_mixer_none': {'SDL2_MIXER_FORMATS': []}, | ||
| 'sdl2_mixer-mp3': {'SDL2_MIXER_FORMATS': ["mp3"]}, | ||
| 'sdl2_mixer-none': {'SDL2_MIXER_FORMATS': []}, | ||
| 'sdl2_mixer-mp3-mt': {'SDL2_MIXER_FORMATS': ["mp3"], 'PTHREADS': 1}, |
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.
Can you use single quote here and above.
|
It would be good to a test here that depends on this new variant. What is the set of command line flags you used to cause the |
|
Also can you rebase or merge so you are up-to-date with main? |
|
Hi @sbc100
Here is a reproducible example of the build failure when building the project that depends on sdl2-mixer with https://github.com/oleg-derevenetz/fheroes2/actions/runs/12609145320/job/35142382904#step:5:40 and here is the corresponding test PR: If there are any issues with maintaining this PR, I can create my own (based on this one with credits to @db-tech) to speed up the process, because I'm interested in solving this build issue, since I would like to build my project for WASM with threads... eventually. |
|
Hi, sorry for not answering. Tomorrow, I might have time to address the comments. Otherwise, I am back next week. |
|
As @oleg-derevenetz said "-pthread" is the option which results in issues. |
- since upstream emscripten-core/emscripten#23094 was merged, the local patch is now unnecessary - fix the rest to incorporate these changes
I added support for multi threading (-pthread) to the sdl2_mixer port.
For me this was kind of new but I did try to follow the prinziples of the sdl2_image adn sdl2_ttf (#22946) changes.
I also changed the "_" to "-" for consistency.
Let me know if there is something wrong or missing.