-
Notifications
You must be signed in to change notification settings - Fork 149
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
Append library stsound #650
base: SDL2
Are you sure you want to change the base?
Conversation
The cmake'ry of that library seems confused a lot, therefore it doesn't instill much confidence in me.. Personally I don't think that this should be accepted, at least because that library isn't in any linux distributions if for nothing else. (Plus this kind of addition should have been made against SDL3_mixer, i.e. the main branch, but that the least of issues.) |
I'm closing this. Maintainers can reopen if they think there is compelling reason to do so. |
@yozka, can you retarget the main branch? This wouldn't go in for SDL2. |
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.
About the less-then-ideal CMake support, I created arnaud-carre/StSound#9 that improves this.
We can always maintain those in our fork.
target_compile_definitions(SDL2_mixer PRIVATE MUSIC_YM) | ||
target_compile_definitions(SDL2_mixer PRIVATE YM_SAMPLE_LENGTH_SEC=0.1) | ||
include(external/StSound/CMake/Utils.cmake) | ||
add_subdirectory(external/StSound/StSoundLibrary EXCLUDE_FROM_ALL) | ||
target_link_libraries(SDL2_mixer PRIVATE StSoundLibrary) | ||
target_include_directories(SDL2_mixer PRIVATE external/StSound/StSoundLibrary) |
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.
This only supports a vendored stdound library.
It should also support an already-installed library.
(stsound needs arnaud-carre/StSound#9 for this)
if (SDL_memcmp(magic, "YM", 2) == 0) | ||
return MUS_YM; | ||
if (SDL_memcmp(magic + 2, "-lh5-", 5) == 0) | ||
return MUS_YM; | ||
|
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.
Please add a comment, and use curly braces.
It looks like the gme detection is not formatted correctly.
@@ -0,0 +1,32 @@ | |||
/* | |||
SDL_mixer: An audio mixer library based on the SDL library | |||
Copyright (C) 1997-2023 Sam Lantinga <[email protected]> |
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.
Please double check the copyright dates.
Anyways, these will be updated to 2025 in less then a week. So don't bother ;)
@yozka, can you retarget the main branch? This wouldn't go in for SDL2. ok. Unfortunately, the author of the stsound library is not responding to my requests. Therefore, I will be using a fork from madebr with the necessary fixes. This will allow us to continue working on the project and implement the required improvements. The pull request will be directed to the main branch. Thank you for your understanding. Best regards |
Co-authored-by: Anonymous Maarten <[email protected]>
@madebr |
You can find it at the top of my pr:
|
This file supports playing YM files ( Atari ST music file format )